Xcode 7.1 changing the location of the derived data.
Xcode 7.1 changing the location of the derived data.
- Subject: Xcode 7.1 changing the location of the derived data.
- From: Alex Zavatone <email@hidden>
- Date: Thu, 18 Feb 2016 14:37:15 -0500
OK. I just had a horrible freak out moment in the office building one of our iOS apps that built perfectly yesterday and people might want to take a note of.
Yesterday, I built my main iOS app to a local device without an issue.
Today, I spent the morning on a call going through getting another set of source with linked libraries that had to be built and linked to to actually build on the same iOS device.
In the new app's Build Settings, we had to set up the Other Linker Flags to point to the proper directories where the linked libs were built. Since I'm using the default Xcode Build Location settings of Unique (in a unique subfolder of Xcode's Derived Data location), this meant that the build directory for the .a files were nested deep down in some derived data folder with a folder name like "MyProduct-jdhksjdhvdjkcbkjcbdsvkdsvkdsjhdkjfhdsfjkdhsf" and of course each one was different for each of the .a files I was building.
This is bad if we need to set up a project's Other Linker Flags that links to them all to point to a reasonable location and we're trying to get this up and running as quickly as possible. The developer on the phone suggests I change Xcode's Build Location to Legacy, which puts the build products within a build folder within the project's Derived Data folder. At first glance, this is good, because I can just copy the path from the project to the build folder and update this for all linked .a files, with one entry for Debug-iphone and another for Debug-iPhonesimulator.
Great. We're up and running and building after a 1.5 hour call.
Time to stop working on this project and go back to my main project. Close the current one and open the main.
Instantly build errors appear for missing files, missing #defines, Xcode flagging errors about C99 violations. Big sadness.
So, I spend 1/2 an hour making sure that I didn't destroy the universe yesterday, that all the file differences didn't break something core and then I thought, "Could changing the build location within Xcode like I did an hour ago for the other app break my app?"
Now, I didn't remember what the default settings I used were, but luckily, I have Xcode 7.1 set up and building on another Mac and I was able to validate and change them back.
Try another build. Errors are still there.
Verify that the Build Location is set back to the default, that the Derived Data Location is set back to the default, quit Xcode, relaunch, reopen the project and build.
No errors. The app successfully builds to the device and my heart rate drops below coronary inducing range.
Sadly, I don't have time to determine where in our project's linking settings is some path or project variable that cares about the derived data path or the build path, and would affect find the location of our project header files, but it works now and I know how to switch it back when it happens again.
I just wanted to describe the issue and the cause of it in case any of this happens to any of you, so you know how to fix it.
Hope this is of use.
Cheers,
Alex Zavatone
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden