-
Xcode build time
Got my mac, stumbled through the account signup and Xcode install, and tonight I am building my first projects. Yay!
I can get it loaded on a 3rd Gen Ipod touch, however I am finding that every xcode build takes 20-30 minutes. The app I have is relatively simple, with just one frame. I am compiling on a ~1ghz mac mini.
Has anyone else noted similar build times? Does Xcode cache anything between builds?
-
it shouldn't take that long, when I first started building my apps they randomly took forever too.. but now they all always work fine. I have a mac mini too and they build in generally 5-20 seconds.
try restarting your phone/mac and if it still does it, do a clean build as well. Try not to stress... I thought there was no way I'd be able to handle making an iOS app with the way the building/provisioning etc. messed me around at first, but then it started all working smoothly! there have been loads of other people with similar issues to you and it seems to fix itself.
-
Roger that. I'll give that a shot...
How did that Devo song go?
"When a problem comes a-long.... you must reboot it"
REBOOT IT GOOD
I'll come back and report my luck
-
The reboot gave me a slow compile, so I tried restarting with a clean build. Im not sure how to do this on the xcode end, but I simply saved a new ios project zipfile.
A quick build for the simulator, but then switching targets to the ipod goes slow again.... I'll keep messing with it.
Do you develop with the 'final xcode project' option? Im wondering if not having to recompile every extension might help me....
-
I use the standard XCode export (not the final xcode export).. when you say it takes a long time to build, does the progress bar (near the build button in xcode) go really slowly? If it does, I've never experienced that, for me it used to build quickly and then take forever to start on the device... is that what happens for you?
-
I dont see a progress bar at the bottom, but one at the top. Im using Xcode version 4.2.... It takes a while to build. When it launches on the device, the launch screen appears rapidly, but spends some 20 seconds before my level appears.
It seems that the longest build process item is precompiling the prefix headers.
"Precompile myGame_Prefix.pch"
-
The solution, in case anyone else has this problem.
In Xcode, under 'Targets' (Not Project) , and the 'Build Settings' tab, make sure 'Precompile Prefix Header' is set to 'No'
It is enabled by default for me. Im not sure if this is my xcode version or the zipfile produced by the iOS exporter.
-
Strange. The role of the precompiled header is to speed up compilation. It should be longer to compile the first time, then shorter the nexy times.
DO you know that you do NOT have to build as a project each time on MMF? Just do it the first time, and the next times build as an iOS application : you will gain a great amount of time as the project will not need to be compiled again.
-
Thanks for sharing your solution - and yes, just building the application (cci) and copying it into your project will speed things up massively, after the first time you build it :)
-
I understand that the precompiled header should speed things up, but for some reason, it was recompiling the headers every time.... hence the 20-30 minute compiles.
Now I have that option disabled, the first build for me takes ~2 minutes, and subsequent builds with the cci file take just 20 seconds...
Thanks guys!
-
I have to say build time for me has never been above 30-40 seconds, on a mac mini 2011 here.