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
Ed Williams
2,969 PointsWhy does a specific Deployment Target break my code, and how should I use it?
I'm learning Swift, and noticed my syntax highlighting was different to that of the course teacher's. Then I noticed that when I create an instance of my struct, and use the dot syntax after the instance, Xcode didn't auto-suggest the struct's functions and variables, whereas it does in the downloaded version of the project from Treehouse. After some investigation I noticed that a key difference between my project and Treehouse's is that my project has a Deployment Target of 8.1, whereas Treehouse's has 8.0. I changed mine to 8.0 and immediately the syntax highlighting was restored and I could access the struct instance's functions and variables.
I'm guessing this is a bug, but maybe I have something misconfigured in Xcode? I'd be grateful if anyone could explain the purpose of the Deployment Target and how it should be used, and why this bug occurred.
The setting is located at Project > General > Deployment Info
Ed Williams
2,969 PointsI don't use beta versions of Xcode, but I did download an update recently and now it seems to be working correctly. Thanks Renato!
1 Answer
Renato Nobre
5,805 PointsMine was in 8.1 too, but worked fine! Do you still on Beta Version of Xcode? If not, do you have that latest version?
(I putted as an answer just to get the discussion closed)
Renato Nobre
5,805 PointsRenato Nobre
5,805 PointsMine was in 8.1 too, but worked fine! Do you still on Beta Version of Xcode? If not, do you have that latest version?