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

Diary App - I got two features broken

Neither location nor mood selection appear to work properly. I couldn't find any bugs in my code. Please take a look!

https://github.com/thedc89/DiaryApp

Thanks in advance!

8 Answers

Hi Dawid,

As far as I've tested your problems appear because of Xcode6-Beta and iOS 7.1. If the diary app is built and tested for iOS8 the mood images work without any problems.

The location doesn't really work in the simulator unless you turn it on - The bar on top of the console output should have a location icon on it and you can turn it on from there and simulate a location.

However, I would recommend coding on a stable release like Xcode5 and not a beta since there are still bugs which will make you go crazy when nothing's actually wrong with your code :)

Did you manage to find something? Thanks

Actually I use xCode 5. I set the location to london from the xcode level, but even in this case my app does not work properly on simulator. Did you download my project and got everything working correctly? Maybe I missed something in mood selection or in location issue?

I do appreciate your effort, thank you!

I've downloaded your project from the link you have provided and it opened in Xcode6-Beta by itself, all my other Xcode5 projects are opening in Xcode5... That's why I assumed you were using Xcode6.

I'll give it a try in 5 and come back with an answer.

The version I'm using to develop the app is 5.1.1

Give a try and let me know, thanks a lot!:)

Ash Furrow , Amit Bijlani or Ben Jakuben maybe you guys got idea what's wrong?

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

Dawid Cedrych there are couple of issues in the app that are discussed in the following two forum posts:

Edit: both of these were linked in the notes section of those videos.

thanks Amit and sorry for missing those hints. Nevertheless, something is still wrong with the location.

thanks for your effort!

Ash Furrow
STAFF
Ash Furrow
Treehouse Guest Teacher

Hi Dawid! Looks like you're only creating the location manager if the entry already exists. For an existing entry, the self.location property is set correctly. However, the location is set on the managed object only when insertDiaryEntry is called. Add the following line to updateDiaryEntry.

entry.location = self.location;

And that should do it!

Thank you guys for being so helpful! Keep on doing what you do, TH is the best source of webdev knowledge around the whole web!:)