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
Dawid Cedrych
15,108 PointsDiary 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
Robert Bojor
Courses Plus Student 29,439 PointsHi 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 :)
Dawid Cedrych
15,108 PointsActually 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!
Robert Bojor
Courses Plus Student 29,439 PointsI'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.
Dawid Cedrych
15,108 PointsThe version I'm using to develop the app is 5.1.1
Give a try and let me know, thanks a lot!:)
Dawid Cedrych
15,108 PointsAsh Furrow , Amit Bijlani or Ben Jakuben maybe you guys got idea what's wrong?
Amit Bijlani
Treehouse Guest TeacherDawid 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.
Dawid Cedrych
15,108 Pointsthanks Amit and sorry for missing those hints. Nevertheless, something is still wrong with the location.
thanks for your effort!
Ash Furrow
Treehouse Guest TeacherHi 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!
Dawid Cedrych
15,108 PointsThank you guys for being so helpful! Keep on doing what you do, TH is the best source of webdev knowledge around the whole web!:)
Dawid Cedrych
15,108 PointsDawid Cedrych
15,108 PointsDid you manage to find something? Thanks