I have an Xcode 6 project with two goals - the iOS 8 app and the iOS 8 extension. I use the constant file for both purposes.
I made a mistake when declaring const int without an external or static prefix in the header, which led to a duplicate character linker error.
This erroneous declaration existed for the last few changes of the project, and the constants header was included in the MULTIPLE files from the first day.
Why did I start to get the error only recently - after I made changes to the project file by deleting Main.storyboard - and this is too ONLY on the simulator assembly?
Note: This happened before.
Additional information about when an error occurred:
I deleted the unused Main.storyboard from the project file, and right after that I started getting this linker error. I knew that this error should not occur now, since the corresponding constant has been used for ages.
I fixed the error anyway (declaring the constant as extern instead), but now I started getting some other errors.
Now I have made sure that there is nothing wrong with the code, and it was just Xcode. Therefore, in order to verify that I ONCE ONCE AGAIN deleted Main.storyboard, and strange errors (sorry, I have no entry) returned again with zero code changes.
To confirm this, I checked the full preliminary commit (which worked flawlessly and still had Main.storyboard) on the same computer. This time, without any changes to the code, project or Main.storyboard, I saw the same errors.
This confirmed the absence of any problems with my actual pbxproj and source files, but some problem in the Xcode data was cached (somewhere).
Please note that clearing the DerivedData folder also did not help.
A carousel, Xcode seems to be to blame for suddenly throwing an error or not throwing it all this time. But I am checking to see if there can be another logical explanation of why Xcode unexpectedly βchangedβ its behavior.