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

iOS Build a Self-Destructing Message iPhone App Using Parse.com as a Backend and Adding Users Logging In and Logging Out

Dawid Cedrych
Dawid Cedrych
15,108 Points

Something is wrong with LoginViewController

I cannot run an application properly, I've checked my code and cannot find anything missing. Here are some print screens. http://imgur.com/TLHt6iR,IeBMXNg,dGCybkT,uvCXwhy#0 looks like sth is wrong with loginViewController thanks in advance for help

11 Answers

Thomas Nilsen
Thomas Nilsen
14,957 Points

Can you add an exception breakpoint and run the app again? It then will point to the line that's causing the problem ;)

http://imgur.com/70w6eZn

Thomas Nilsen
Thomas Nilsen
14,957 Points

These images does not help very much unfortunately. But WHEN does the crash occur? When you launch it? When you click on a particular button? When you navigate to a different viewController?

Dawid Cedrych
Dawid Cedrych
15,108 Points

When I hit run in Xcode, while compiling i guess. Here is my project, https://www.dropbox.com/sh/um4c1yjo29tj28q/AAAWs_HRbAlBMmwg8iKYT2M1a it would be very kind if you could take a look. thank you

Thomas Nilsen
Thomas Nilsen
14,957 Points

Got it. In your LoginViewController.m where you declare you username and password. Your 'username' property was properly connected to the storyboard. I checked the storyboard and it said you were connected but, for some reason, you weren't (one of several reasons i prefer to do everything in code ;) )

Long story short. Connect your username property in the storyboard once more and you should be all set.

Dawid Cedrych
Dawid Cedrych
15,108 Points

Well, you mean to reconnect this?

@property (weak, nonatomic) IBOutlet UITextField *usernameField;

I did, and nothing happened:(

Thomas Nilsen
Thomas Nilsen
14,957 Points

Yes that was exactly what I meant. Hmm, that odd. I did it and the app ran without problem.

EDIT:

What's even more strange is the fact that i download from your dropbox link once more, ran the project without changing anything, and everything worked fine..

Dawid Cedrych
Dawid Cedrych
15,108 Points

So could you please upload the project and give me a link, maybe this strange thing will work in both directions :) My question is, how to detect such problems, when neither exceptions nor console log are not quite helpful?

Dawid Cedrych
Dawid Cedrych
15,108 Points

Cool, now it works. I have no idea why I can't do this reconnection properly, but your project works perfectly. Thank you Thoman, I'm really grateful!

PS. how you detect such issues? I would never figure it out that it was about connecting a property.

Dawid Cedrych
Dawid Cedrych
15,108 Points

I got these 3 connected and still my project is yielding the same exceptions, funny:) Anyway, thank you very very much!