Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Masao Kitamura
1,783 PointsCode challenge Logging in and Logging out 4 of 4
Finally, switch back to MainViewController.m. In the logout method, before the Login view controller segue is performed, add a call to Parse to logout the current user. Hint: Use the PFUser class method.
I thought the following code would work, since I pulled it straight from the video:
- (IBAction)logout:(id)sender {
[PFUser logOut];
[self performSegueWithIdentifier:@"showLogin" sender:self];
}
It's basically an addition of only one line... the logOut line.
Why doesn't this work?
UPDATE: It doesn't work because I think it's a bug in the code challenge. If you use "logout" (all lowercase), it works.
3 Answers

James Barnett
39,199 PointsTagging Amit Bijlani on this one

Masao Kitamura
1,783 PointsOk, cool... Ben Jakuben is the author of the tutorial (not sure if this matters)

James Barnett
39,199 PointsI forgot that Ben Jakuben did the newest iOS course, oops. Thanks for the correction.

Pawel Bednarczyk
Courses Plus Student 2,843 PointsIt still doesn't work for me both on whether I am use "logout" or "logOut"

Ben Jakuben
Treehouse TeacherCan you paste in the code you are trying?

rishavatreya
4,945 PointsBummer! Compilation Error! Make sure your syntax is correct and that you are calling the 'logOut' method from the correct place. I tried both logout and logOut.

Ben Jakuben
Treehouse TeacherCan you paste in the code you are trying? I just got it to pass. Are you using PFUser?
Ben Jakuben
Treehouse TeacherBen Jakuben
Treehouse TeacherUgh - so sorry about that! I stubbed out the PFUser class so we don't have to actually contact Parse from our Code Challenge engine. As such, I made a typo. I will fix it and update it now.
Elizabeth Fawkes, can you reward Masao with the Exterminator badge?