After installing Xcode 5 I immediately noticed it bringing up the windows/projects from a previous Xcode 4.6 session. Of course this is expected behavior if I am upgrading, but since this is only a preview/beta release it made me a bit nervous....
Is it reasonably safe to let Xcode 5 and Xcode 4.6.2 point to the same project directories (maybe not while running simultaneously?
Yes, it is perfectly fine and I have been using mainly XCode5 but switching to 4.x every once in a while. The only thing to be careful of is when opening some files, it may ask if you want to convert them to XCode 5 format. If you do, you will not be able to open that file in XCode 4.X anymore (or so the warning says, I've never clicked yes).
JSdodgers's answer is perfectly valid.
Upgrading XIBs is a big pain.
Note that you won't be able to use every new XIB feature in Xcode 5 if you don't use the Xcode 5 format.
The best solution is to have a separate branch (git or svn) for your iOS 7 code.
Related
I am posting this after reading many similar posts on here regarding this issue and none of the solutions that worked for other people not working...
Xcode Version 8.3.3 (8E3004b)
Swift 3.1
Things I tried
Deleting Derived Data folder
Deleting Workspace File
Cleaning Build Folder
Cleaning Build
Reinstalled Xcode (after complete removal)
I also looked for Swift Issues:
Removed all concatenating strings
Cleaned up Swift arrays and dictionaries
Added Whole module optimizations
This all started happening after last Xcode update of 8.3.3. My project was compiling within seconds and now I have to wait at least 15 mins for it to index, then 5 minutes to compile after everything I change even something small in code.
When Building, it get stuck in "Compiling Swift source files". Is there way for me to look in to where it is actually getting stuck?
BIG UPDATE
I tried pretty much everything. Read every article, post, ect. NOTHING worked. My project was created right after 10.0.
Solution
Creating a new project and copying each file worked! It used to take 8-9 minuted to build. Now less than 2 seconds!
Apple knows about this problem, and says that Xcode 9 beta will perform much better. Note that if you don't want to update to Swift 4, you can continue compiling in Swift 3 mode using Xcode 9. The big limitation is that you won't be able to submit your project to the App Store until Xcode 9 goes final.
Also, Xcode 9 contains a new build system. You don't get it by default: you have to turn it on for this project. Choose File > Project Settings and switch the pop-up menu to New Build System (Preview). This is experimental, but it will be the default build system eventually, so it would be interesting to know whether this makes an appreciable difference.
If you don't want to update to Xcode 9 beta, you will just have to do a binary search: comment out all your code and start adding it back, piece by piece, until you find that piece that's causing the trouble.
The best way to work this out is to find what out what the build is doing while compiling your code. This is a really useful tool to use: https://github.com/RobertGummesson/BuildTimeAnalyzer-for-Xcode
When you run this tool it will show you what methods are taking the longest to compile, and then you fix those. Once you have done that, you can also try the answer I gave here to decrease the build times: Extremely long compilation times with Swift in Xcode
When I open a project in Xcode 9 (or previous versions) and check the File Inspector, there's a section called Project Document, with a combo box named Project Format.
The available options (in Xcode 9) are Xcode 3.1-compatible, Xcode 3.2-compatible, Xcode 6.3-compatible, and Xcode 8.0-compatible:
What are the differences between those formats?
-- UPDATE HISTORY (as of 20 May 2019) --
I originally asked this question when Xcode 6.4 was around.
Xcode 6.4's list included Xcode 3.1-compatible, Xcode 3.2-compatible and Xcode 6.3-compatible, and defaulted to Xcode 3.2-compatible.
Xcode 7 didn't introduce any changes.
Xcode 8 added an Xcode 8.0-compatible item.
Xcode 9 changed the default for new projects to Xcode 8.0-compatible. (8 Oct 2017)
Xcode 10.2 added Xcode 9.3-compatible, Xcode 10.0-compatible (May 2019)
There does not seem to be any major breaking change in this format change (I tried few of my project, nothing changed in the xml structure itself except the version parameter..).
As far as I remember, there were few project formats before that, some of which actually had major changes, but that is probably not going to happen again because that was in the times of major structural changes to iOS, like from iOS2 to iOS3.
Also, just side note, the default for new projects is still 3.2 so it is very likely that 6.3 is basically for testing and version that they will force later will be -7.
My best guess would be that the new format is there for Swift 2 and the way how modules / dependencies are handled in there, as it for sure requires some additional data to be present in the project. But to be 100% sure we would need information from somebody on the Apple Team.
Hope it helps!
I have a small bug in my application that only exists when building with Xcode 6. I fixed this bug, but then this part is bugged when building with Xcode 5.
So there is an ugly battle between the two Xcode versions..
Now.. I want to check which Xcode version is being used to build the project via a preprocessor. Is this possible to do so? If so, this would fix my problem really fast.
I am using Xcode Version 6.1 (6A1052d), it is working well except the only problem is auto complete and code sense is broken for swift projects.
I can fix it by deleting derived data and the folder ~/Library/Caches/com.apple.dt.Xcode, which is described here, or changing the deployment target of the project from 8.1 to 8.0.
However, the first solution only last me for 1 or 2 days, out of no where it doesn't work again, I don't want to delete the folders every so often or change the target iOS versions all the time. Please help me.
I have had the same issue for many days while working in swift, finally I have deleted some old data in the directory ~/Library/Developer/Xcode/DerivedData and started the xcode again and error is disappeared.
Hope it helps!
it's not gone .. I do this procedure 3-4 times a day while coding .. did anyone find a permanent fix? I'm on Xcode 6.3 beta on Yosemite.. on 6.1 I had to do this process more than 5-6 times per day, but they did not fix it entirely :(. I observed that working in one file and not switching back and forth really delays this from happening + if you work with collection views or table views and switch and modify in all files of your MVC architecture, there are greater chances you will need to restart Xcode (which in 6.3 beta fixes this issue automatically). If only there was a way to force a re-indexing on the project ..
I have an old app I maintaining. The app was first compiled on XCode 4.2. If I take the exact same project that works find and compile it on XCode 4.6 I'll get weird bugs such as ViewControllers not refreshing, Back doesn't work as it should etc'. If I'll take the same project and recompile it on xcode 4.2 on my other machine everything will work fine. Before I'm digging into the code, can someone give me an idea why something like this may happen? My main suspect is the Base SDK of each Xcode. Does that make sense?
I couldn't tell you if there will be a difference between 4.2 and 4.6, but historically the iOS frameworks on the device (and, to a lesser degree, the simulator) do adapt slightly depending on what version of the SDK an application was compiled against. You can't rule it out.
A classic (though now ancient) example is backgrounding. Apps built against older SDKs were quit when the Home button was pushed, rather than getting the newer behaviour. More recent (but subtle) examples have included several changes to table views and changes to device rotation.
You should not attempt to build with an older SDK using a newer compiler. Apple doesn't support that kind of configuration. You should always use the latest SDK. And you wouldn't want to pretend these problems don't exist, anyway: The bugs are real, they were just hidden before.
It's unlikely that you won't be able to fix those bugs in such a way that the older versions of iOS continue to function (though you may discover it opens a can of worms that you decide isn't worth fixing for older OSes).