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:



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.