xcode clean failed - iphone

Both my iPhone projects are sometimes giving a "build failed" error with no explanation of what the error is, and then a "clean failed" when I try to do a clean. I tty emptying the xcode cache but that doesn't seen to help. What normally clears it is re-starting my Mac. However, that has just failed to work.
Has anybody else experienced this? I'm using the latest version of the SDK on Snow leopard.
(My Mac has also completely frozen twice today to the extent that only turning it off at the mains seemed to revive it so not a good day).

Make sure you have enough disk space on your mac.
Then go and delete your build directory in the project. Close xcode, open it back up. Try to build.
Hope that works, its just a guess.

Your Mac froze? Twice? On the Same Day? Seems your Mac is in serious disorder, I would look for this first. Maybe the build problems are just another symptom of a bigger issue.

Also, apart from checking out Xcode's logs in Console.app and posting anything interesting, did you install Xcode 3.2 from the Snow Leopard DVD before installing the iPhone 3.1.2 SDK for Snow Leopard?
If you upgrade to Snow Leopard (w/ Xcode 3.1 installed), and then immediately install the latest iPhone SDK (before installing Xcode 3.2 from the Snow Leopard disc), you may experience grave problems like this one. I know I did.

It sounds like you have disk/file problems. Check the permissions on the files and directories in the projects build folder. If you've lost permission for one of the files, the clean will fail.

Related

XCode 4.2 Installation error

I downloaded XCode 4.2 from apple developer website. after I download it and try to install, error message pops out saying "The Following Disk Image Couldn't be Opened , xcode_4.2_and_ios_5_ not recognized " has anyone here experienced this kind of error?
Mac Os X 10.6.8
Thank you guys!
Sounds like a corrupted disk image... may just have been a bad download. Restart your computer, and if you still have the same problem, re-download. (And obviously make sure you're downloading the Snow Leopard version of Xcode since you're running it on 10.6.8... but I'm sure you were, and that wouldn't in any case lead to the error you described.)

Does upgrading to OSX Lion have ANY caveats for development using Xcode?

Simple question, I want to know if anyone has had any weird or annoying problems with developing iphone apps in Xcode after upgrading to Lion. I remember having issues when Snow Leopard first launched. Are there any early adopter penalties here?
A big one for me: no more PowerPC emulation via Rosetta in 10.7 - important to think about if you need to do testing for legacy PowerPC code.
Fortunately you can still use Xcode 3.2.6 though if you don't want or need to use Xcode 4.1 - if Xcode 3.2.6 is installed prior to upgrading t Lion then it should still work, alternatively there are instructions available for installed Xcode 3.2.6 when Lion is already installed.
I just had the problem, that I had to upgrade to Xcode 4.1 because lower versions of Xcode don't work on Lion. ;-)
You have to download the latest Xcode 4.1 to do development on Lion. 4.0.x won't work.
You also have to learn how to scroll down pages like a flight simulator (you can turn it off). If you got used to the neat gestures in Snow Leopard, then get ready to completely start over again with new ones (no going back on Lion). Three finger web page navigation doesn't work, 4 finger application switching doesn't work, and a new "explosion" gesture is used for desktop and mission control.
The only thing i have noticed so far is that if you run Xcode in fullscreen mode, simulator can't be on same screen... And yes, you have to download new Xcode 4.1 from appstore... Everything else is pretty much amazing :-D
When you try to install Xcode 3.2.6 on Lion, Xcode toolset is greyed out and marked as skip. There is a simpler way to install it then those once described above. Here is the steps:
Mount the developer tools dmg
Open Terminal and run these two commands:
export COMMAND_LINE_INSTALL=1
open "/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg"
Enjoy.
Be prepared for the new Xcode to remove the /Developer directory as a part of its cleanup process. This will wipe out QT in the process since it's installed there as well.
So if you want to keep QT intact you should skip Xcode's cleanup step or install a fresh QT afterwards.

iPhone Simulator locks up immediately upon Build / Run

I'm having a problem getting my MacBook set up to build iPhone apps in xCode. The iPhone Simulator locks up and shows the "spinning circle" busy icon.
I've tried everything I can think of, including
resetting the simulator
tried all of the different hardware options
tried the two debug build choices in xCode.
uninstalling the SDK and completely reinstalling
I downloaded the SDK today - "xcode_3.2.2_and_iphone_sdk_3.2_final"
I'm just upgraded from Leopard to Snow Leopard (10.6.3). I've run all the software updates. xCode version says 3.2.2 (1650)
If it matters, my MacBook is 3-4 years old, 13 inch, dual 2.16 ghz intel cores, 2 gig RAM. I've never had a single problem with it.
I would be so grateful if anyone can help me
thanks so much,
if you have access to the 4.0 one, then try that, if not, then I would install a previous sdk version in a different folder (or rename your current developer folder or delete it, then install the previous version under /Developer) and run that one instead
I just finished installing the 4.0 SDK. I made a new windows-based iPhone app (HelloWorld) and tried a build/run (Simulator-4.0 | Debug)
Same exact behavior... The simulator appears and the rainbow spinning progress wheel just keeps going and going
I took a sample from the process ("not responding...") but it's pretty big and I don't see any way to attach it to this question.
thanks again

Can't build a new project with xcode on my MacPro

I've installed on my MacPro (intel) Xcode 3.2.1 (iPhone SDK 3.1.2) and Snow Leopard
I made a new project (called Untitled) for iPhone OS, when I try to build, it returns an error:
*file not found:
*/Users/user/Documents/Untitled/build/Untitled.build/Debug-iphonesimulator/Untitled.build/Objects-normal/i386/main.o
*/Users/user/Documents/Untitled/build/Untitled.build/Debug-iphonesimulator/Untitled.build/Objects-normal/i386/UntitledAppDelegate.o*
*Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1*
and doesn't go over!!
what i've to do to fix?
thank you for your answers
"Untitled" is a common place holder so it's possible that the using that as the project name has caused a problem with one of the build scripts. Try another project with a more unique name.
Other possible problems: (1) Permissions problem with the build directories (2) if you messed with the build settings you might have switched off the creation of the executable.
Edit01:
(Response to comment)
It sounds like you have a nasty corruption problem for some reason. Some things to try.
(1) Create a new user and try to run Xcode from that account. That will tell you if the problem is with the developer install or if its some kind of preferences or other file in the user's home directory. Xcode and the other dev apps dynamically create a lot of directories and files that an reinstall will not affect.
(2) You can do a complete uninstall of the developer tools from the command line.
sudo /Developer/Library/uninstall-devtools --mode=all
(3) Xcode is just a face application for a full suit of unix command line development tools. If you installed different versions of these tool e.g. gcc, gdb etc, you might have altered something critical.
(4) Xcode plug-ins can cause problems. Make sure you remove all of them.
I had a crash in Xcode once, and afterwards I could never get Xcode to run under that user account. I spent nearly two days trying to troubleshoot before giving up and moving to another account. That turned out to be a good thing because it allowed me to create an account focused solely on development without all the distractions of my normal account.
Doesn't Xcode 3.2 (not 3.1.2) ship with Snow Leopard? If you're using Snow Leopard, you should be using the appropriate version of Xcode for Snow Leopard, which is the 3.2 series.

iPhone: There is no SDK with the name or path 'iphoneos3.0'

A friend of mine just had to reinstall his OS (after power went down while updating) and when he installed Xcode he got this error. In the drop down that usually has device/simulator etc, it said 'missing'. I also noticed he had no developer folder on his machine as well. Anyone know why this might be?
Tell me about it. Try this
in XCode goto 'Project' Menu and select 'Edit Project Settings'. In the General tab, last but one item, select the drop down list 'Base SDK for all Configuration' There you can specify which SDK your project will target.
I had this problem after installing the Xcode that comes with Snow Leopard. To solve it I downloaded Xcode for iPhone. The Xcode that comes with Snow Leopard does not include the iPhone SDK.You have to be a registered iPhone developed to use it.
I had him reinstall it with me there, and I noticed that the action for the developer tools, was install as opposed to upgrade, and it was grayed out so not sure how he would have been able to avoid that. In any event he reinstalled and got the same error when launching from the dock. He then launched from terminal and it worked fine... so somehow he got two installs or some weird scenario. In any event we found the .app that spotlight saw and put it on the dock and then it worked.
The system does not include the dev tools (and hence the /Developer folder) by default. He needs to re-install the dev-tools from his CD (or from developer.apple.com), and also re-install the iPhone SDK (only available on developer.apple.com).
EDIT: I didn't see he re-installed XCode. Sounds weird. Make sure you re-install everything, and that you have the correct rights. However, is no issue is found by the installer and you still don't have a /Developer directoty, there might be something weird going on...
After Xcode updated to Version 11.6 got this error.
error: There is no SDK with the name or path '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk'
Looks like iPhoneSimulator13.5.sdk got removed.
Fix by downloading "iOS 13.5 Simulator"
In Xcode -> Preferences -> Components downloaded iOS 13.5 Simulator again.