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

Incorrect weather information for the Stormy app in Network programming with Swift 2

Incorrect weather information for Stormy app in "Networking Programing with Swift 2.0" I look and the weather information that shows up on the app simulator says 80* when i look on the weather app on my phone and it says 51* for the same location i checked and its the same location and on the dark sky forecast API it made the network call so it is displaying information just the weather is off and the symbols are off during a bright and sunny day it displays a moon. And yes i did double check the coordinates it was on and I have constantly re copied and pasted them in. Could someone please help because i would like to use this app on phone.

4 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,863 Points

Hey Christian,

Without you posting your code with the question, it's really tough to help troubleshoot. However, if I remember the course correctly 51º is the value that is Hard Coded in the beginning for layout purposes. If you still have that code in there, it doesn't matter which data comes back, it will always display the Hard Coded value.

If that doesn't help, you will need to post your code in order for us to help you troubleshoot the problem. Please refer to the Markdown Cheatsheet for posting code to the Forum.

:) :dizzy:

I copied Pasan's file just to make sure and it still is incorrect.

like i moved his file over and saved it on my desktop and still it did that

Jason Anders
Jason Anders
Treehouse Moderator 145,863 Points

I'm not really sure then. ? Sorry. I double checked, and the 51º is the Hard Coded value used in the beginning of the course. Maybe just delete your files and run from the Project Files provided for the video you are currently in.

Like I said, without you posting your code, I cannot troubleshoot where the problem may be. But I know the 51º is a Hard Coded value, and that's why it isn't changing for you.

Its changes its just incorrect.and i copied his last file from the last video

You can debug your code by placing a breakpoint or printing out relevant data into console.

If you find that you get JSON data with wrong values, it means that you are sending incorrect coordinates. Mind that Simulator is a bit buggy when it comes to geolocation. When you change simulated location, it doesn't take effect until you re-run the app. Triple check that your application recieves correct coordinates.