Semester 2 – Post 8

I have successfully created a user’s setting view where the login and logout work. At this point I am feeling pretty confident about tackling most things thrown my way if given enough time.

The two things I am currently having problems with:

1) After adding a new attribute to the People list (User and Truck Owner) the login stopped working because when it asked the app delegate if it had a Person with object it only passed the email and password attributes. The app delegate only has people with those two attributes PLUS the type attribute, so the answer was obviously CRASH. I need to figure out how to properly pass and check things like this so that I don’t do the “dumb” fix of adding another text field in order to pass and check the right type of object.

2) I have the code that could allow me to determine which type of user’s setting view I show (either a user or a truck owner) for the fifth tab bar. I run into trouble when I already have a tab bar xib and the code I found involves creating it through code rather than a xib. I think I have to delete the mainwindow.xib and do everything through code now (or at least that would be the easiest way for me to understand without getting completely lost).

Semester 2 – Post 7

I have successfully implemented another modal view for the people that forgot their password. I realized just a few hours ago that there isn’t much more I can do with the Truck App other than touching it up a little.

Tasks to do:

1) Figure out how to show certain tab bars for certain types of users

2) Add a sign up for Truck Owners

3) Finish GUI implementation

… more to come.

As far as I can see the iOS development side of this application is almost complete!

Semester 2 – Post 6

Thus far I think my understanding of Objective-C has advanced much further than last semester. I think I understand how methods and variables are used, declared, ect.

It’s very reassuring when I can read this and know what it does:

-(void)newUserControllerDidFinish:(NewUserController *)controller

{

//Create person, check to see if person is in database, if yes display alert, if no add person and dismiss modal view

Person *selectedPerson = [Person personWithEmail:controller.usernameTextField.text password:controller.passwordTextField.text];

if (![((Truck_Tracker_AppAppDelegate *)UIApplication.sharedApplication.delegate).listPeople containsObject:

selectedPerson])

{

Person *newPerson = [Person personWithEmail:controller.usernameTextField.text password:controller.passwordTextField.text];

[((Truck_Tracker_AppAppDelegate *)UIApplication.sharedApplication.delegate).listPeople addObject:newPerson];

// Do whatever is needed upon a successful login.

[self dismissModalViewControllerAnimated:YES];

} else {

// Display an error message, and do not dismiss the login screen.

[controller alertNeedNewUserName:self];

}

}

The Truck App’s GUI is coming along, but I need to figure out how to implement a logout button throughout the app. I think after talking to Chris I will most likely end up creating a user’s settings page where they can logout there.

Semester 2 – Post 5

I am trying to get the logic for the password and username to work with the login with the following code:

 

-(void)loginViewControllerDidFinish:(LoginViewController *)controller

{

if  ([((Truck_Tracker_AppAppDelegate *)[UIApplication sharedApplication].delegate).listPeople containsObject:

[[Person personWithEmail:[controller.usernameTextField.text]] password:[controller.passwordTextField.text]])

{

// Do whatever is needed upon a successful login.

[self dismissModalViewControllerAnimated:YES];

} else {

// Display an error message, and do not dismiss the login screen.

[controller alertFailedLogin:self];

}

}

The code won’t run because it issues an “Expected identifier” which is basically what I am looking to find. I understand what this says, but I do not think I am to the level of writing it yet.

Semester 2 – Post 4

I was successfully able to get the modal view to pop up last meeting; however, it required a little more tweaking to get it somewhat functional. This time I was supposed to dismiss the keyboard and get the logic to check the username and password database of users.

Thus far I have been unsuccessful in finding the correct logic to do so, but I am very close to getting the keyboard to dismiss.

Semester 2 – Post 3

I have added a new mock database for the Block Party as well as a mock database for users once I get the login screen working.

I have also revised the number and placement of buttons on the TruckDetailController, and it will be replicated in the BlockPartyDetailController as well. I want fewer buttons for now. If we want to add more we can always apply an update.

Hopefully by this Thursday I will have successfully implemented:

-Block Party Detail Views just like the Truck Detail Views

-A login view that utilizes the user database

-A way of displaying certain tabs for different types of users (i.e. people vs. truck owners)

Semester 2 – Post 2

I am presently working on cleaning everything up in the app. I’m also moving the mock databases to the app delegate. There are now 3 of them (one for the users, one for the trucks, and one for the block party. I’m mainly having trouble with importing and utilizing the databases after I create them. I have also made a login page for the users, but the functionality is still not there.

I would like to figure out how to populate tableviews and get the login screen to work.

Semester 2 – Post 1

Learned github today. Important things to remember:

cd into the folder

git status, git clone, git pull, git commit -a -m “message here”, git add FILENAME

I am now working with Chris to replicate the Truck App to what it currently is. From there I will be making a few more additions before moving on to the server side with Brian Handy in February.

Post 13

Lucky number post 13… or not so lucky.

I’ve been trying to troubleshoot Xcode the past two days, but for some reason when I upgraded to 4.2.1 it caused an error in my xib files. I tried deleting it, but all it did was cause an error in a different xib file. This will need to be fixed today, so that I can get some stuff done over break.

 

Post 12

This week I have been attempting to configure my spare iPhone for app development. I find it funny that Apple, which is normally a very straight-forward company when it comes to doing things such as this, was surprisingly not helpful and has made the entire process very difficult. I understand why they make it so secure, but the videos online are not even up to date with the latest version of Xcode, and when I called the tech support hotline the person I spoke with could not even point me in the right direction.

Last week I saw how an annotation was made. This was a very cool concept that added to my foundation of programming which is slowly building. I had to create an annotation for the trucks where I passed all of the truck objects, along with its individual components, into a TruckAnnotation.h and .m. This had to be done so that the map view, which I was trying to get pins to work on could receive the annotation with a trucks coordinates and drop a pin where it was located. By doing this annotation, I did not have to change my original truck objects or its data. Instead, I made a different version of it so that the receiver, which expected an annotation, could understand it.

I am presently working on getting the button on the annotation to take it back to trucks individual page using the sample code that I had used for the annotation. Because I have been unable to successfully port my app to my iPhone, I won’t be able to even test the “Find User Location” if it does work.