Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Xcode Problem

Hi there. I'm relatively new to programming for the iPhone, and I have Xcode 3.1. As a starter, I decided to download videos from Apple to help me learn how to use Xcode for the iPhone better. So I did what they said: create a new project, make it a Cocoa Touch List application, and name it "Sample". Then click "Build & Go", and you SHOULD have the iPhone simulator open up with a list of countries and whatnot. Doesn't work for me: it gives me 1 error and 1 warning. It says, "gcc-4.0: installation problem, cannot exec '/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1': No such file or directory" and "CodeSign warning: code signing is not enabled for product type Application Wrapper". In the tutorial video, it showed the man being able to run his application on the simulator with no problem.

Also, when I try to "build & go" with a blank iPhone OS Application (such as a Tab Bar Application), it builds correctly, but then says, "Error from Debugger: Failed to launch simulated application: iPhone Simulator failed to install the application." What's going on here? This never happened with applications for Mac OS X, and this happens even when I have something in the application, when it's not blank.

Thanks for reading this, and if you have anything that might be able to help me out, I'd be glad to hear it. Thank you very much.

MacBook 2.2 GHz Core 2 Duo (White), Mac OS X (10.5.4)

Posted on Aug 5, 2008 10:45 PM

Reply
20 replies

Aug 30, 2008 10:40 AM in response to Electroholic

Hi, did you find solution to your problem? I just installed the XCode on my first gen Mac Book Pro (Core Duo). When I tried to run the simulator, it can not run and said "Failed to launch simulated application: iPhone Simulator failed to install the application.". Similar to your case. Thanks
for any comment.

Oct 17, 2008 6:39 PM in response to Electroholic

Maybe a dumb question, but it is possible that you downloaded and installed Xcode 3.1 disk image (which does not contain the iPhone SDK) instead of the iPhone SDK disk image (which includes both the SDK and Xcode)?

Is the iPhone Simulator installed on your system? It should be located here: "/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator"

If it's on your machine you should be able to manually launch it from the above location without needing to run Xcode. Launching it like this won't solve your problem... but it might at least tell you if the simulator is installed correctly and functional.

Steve

Oct 17, 2008 8:45 PM in response to Steve Herman1

Here is my situation:

I have had Xcode installed since I upgraded to Leopard (but I have hardly used it, I'm pretty new to developing). I recently Installed the iPhone SDK (which I am almost positive was with iPhone 2.1 and the latest SDK version).

Whenever I "Build and Go" for any iPhone Application, even if it's sample code, I get the message "Failed to launch simulated application: iPhone Simulator failed to install the application." When I open the Simulator manually, it is a black screen unless I change the version to 2.1 (it always defaults to 2.0). When I change that, I see the home screen, but even if it is already open before I build and go, I get the same message.

After a few Failed tries, I get this Message:

"Internal Error
File: /SourceCache/IndigoDebuggingPlugin/IndigoDebuggingPlugin-31/IndigoDevice/XCiPho neSimulatorDevice.m
Line: 265
Object: <XCiPhoneSimulatorDevice:0x027cf3d0>
Method: _launchSimulatedExecutable:

Assertion failed: nil == _currentSimulatorSession"

Restarting and reinstalling haven't helped. Any ideas?

Thanks

Oct 21, 2008 9:48 AM in response to louielu12

Although I've used Xcode for a long time, I've only recently started playing with the iPhone SDK. So I don't really know of anything quick and easy to suggest you try to "fix"... and no one else seems to have offered up any suggestions either. So my "brute force" suggestion would be to completely uninstall and then reinstall all of Xcode and the iPhone SDK.

The disk image file you downloaded with the SDK should have a read me file that discusses uninstalling the Xcode tools on the last page of the document.

Assuming you installed into the default location "/Developer" you'll basically just need to run this from the Terminal command line to uninstall all the bits and pieces of Xcode:

sudo /Developer/Library/uninstall-devtools --mode=all

Once that's done (you may want to reboot) then just reinstall again from the iPhone SDK disk image.

Steve

Oct 21, 2008 5:47 PM in response to Steve Herman1

Thanks for helping. However, that didn't work for me.

I uninstalled xcode with that terminal command, and it worked. I restarted, re-downloaded the .dmg file of the SDK, and installed. I'm getting the exact same problem. When I click "Build and go" from a blank app, an Apple example app, or an app from somewhere on the internet (such as apps amuck), the simulator opens, but all I see is a black screen. Back in Xcode, it says that it failed to install in the simulator.

In the simulator app, under Hardware>Version, 2.0 is always selected instead of 2.1. It takes a few tries to force it into 2.1 and then apps still won't install.

Does that give any insight to the problem?
Also, I'm pretty sure you can't, but is there a way I can install an app on my phone without paying the $100?

Thanks

Oct 22, 2008 9:52 AM in response to louielu12

Wild guess...

The simulator should create a group of folders in your home folder at:

"<your homefolder>/Library/Application Support/iPhone Simulator/User/..."

Inside that "User" folder I've got "Applications", "Library", "Media", "Root" and "tmp". These simulate the folders that would normally exist on an actual iPhone. When you build an app in Xcode and "install" it on the iPhone Simulator it gets copied over into the "Applications" folder mentioned above.

All the above folder should get created automatically if they don't exist, but I suppose if there was a permissions problem creating or writing to the above folders then that could potentially generate an error indicating the app could not be installed into the simulator. See if the above folders exist and check the ownership and permissions on them.

Another thing you might want to try is to create a brand new user account. Login to the new clean user account and try creating an Xcode project within this account. If it works for this user account then that would almost certainly point to something that's screwed up in your own home folder (and not with the Xcode installation).

Steve

Oct 22, 2008 3:04 PM in response to Steve Herman1

I got it to work! Thank you so much!

I checked that folder, and I only had read permission (the system could Write). Inside the folder, I only had a Media folder and one other one.

To fix it:
1.Make a new user account.
2.Download source code from a website like appsamuck.com
3.Open the source in Xcode and click "Build and Go" (which worked for me unlike in my user account)
4.Navigate to <newuser>/Library/Application Support/iPhone Simulator and copy it to your normal user account. The drop box didn't work for me, so in my normal user account, I went to Mac HD/Users/<new user>/Library/Application Support/iPhone Simulator and copied that folder to my desktop. Note that you will have to authenticate to get that far into the new user account
5.Moved it to the same spot in my user account

Steve, thank you so much for your help!

Oct 30, 2008 8:58 AM in response to rickcurran

Creating a new user account and testing the problem under that account is mainly just a quick and easy way to determine if the problem is system-wide or confined to your regular user account.

Trying to then copy the folders created in the new user account (that are working) back over to your own user account is probably sort of a messy way to try to straighten out the problem.

Once you determine that the problem is a permissions issue in your own home directory it's probably easier to just fix the permissions directly (if you can find which ones are wrong and if you're familiar enough with Unix permissions to manually fix them). Or if you're not Unix savvy, then you could just delete/rename the "iPhone Simulator" folder and allow a new folder structure to be automatically created next time to run the simulator.

Quit out of Xcode.
Go into your Home Folder -> Library -> Application Support
Rename the "iPhone Simulator" folder to something like "iPhone Simulator-Bad" (you may have to provide an admin id/pw if the permissions are screwed up at this level)
Relaunch Xcode, open your iPhone app project and try to run it in the simulator - this should create a whole new directory structure which should have the correct permissions.

Then at some point you can go back and delete the "iPhone Simulator-Bad" folder if you want. Again, you may need to provide admin id/pw if there are screwed up permissions somewhere in this folder hierarchy.

Steve

Xcode Problem

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.