iPhone Simulator: SpringBoard failed to launch application with error: 7 - iphone

Building an iPhone project results in:
Failed to launch simulated application: SpringBoard failed to launch application with error: 7
And the app doesn't install on the simulator. What's this all about? What's SpringBoard and what is error 7?

I had the exact same problem - I reset the iphone simulator and then quit the simulator (i.e. command q) then started it again.
Worked.

Boy, is the answer to this one hard to find, but I came up with a workaround. The simulator gives this error if it has any problems with accessing files in ~/Library/Application Support/iPhone Simulator/. This could be a permissions problem, but in my case it was even more subtle: my home directory is NFS mounted, and that seems to somehow be the source of the problem.
The basic workaround is to create a directory local to the machine, and link the iPhone Simulator's directory to that local directory. You shouldn't need to move your source files or project directory; it's just the simulator targets that are the problem.
Here is one series of steps to accomplish the workaround, to be typed in at the terminal
(1-3 done on every machine you'll be developing on, 4-6 once in your NFS-mounted home directory):
sudo mkdir /usr/local/iphone-dirs
sudo chmod 777 /usr/local/iphone-dirs
mkdir /usr/local/iphone-dirs/my-dir
cd "~/Library/Application Support/"
rm -rf "iPhone Simulator/"
ln -s /usr/local/iphone-dirs/my-dir/ "iPhone Simulator"
There are obviously many variations on this theme; I suspect that using a locally-hosted directory in /tmp would be fine (and not require admin privs, but would have to be redone every time the system is rebooted). As given, steps 1 and 2 are good if you will have multiple users using these machines that you don't want to collide with each other. If you have your own personal machine but NFS-mount your homedir, you could probably just skip to something like step 3 (and sudo it). Just make sure that whatever dir you create in step 3 is the dir that you symlink to in step 6.

No need to quite the simulator or delete the app..
Just select simulator, press command + shift + h + h and remove the app from background process(long press on app icon) then run your app again.

I started with a new project in Xcode and got the error 3 message, but otherwise same deal. New damn project - so no problems with broken code I added or name mistakes or anything else. But the app would build but fail to run in Simulator with the Springboard -3 error code. I've seen this before lots of times, and the basic kill-the-app-in-simulator, clean-and-run would work, but not this time.
Turns out my old 2007 iMac barely has enough RAM and disk space free any more. I'm running Mavericks, and I hid everything but Xcode and the Simulator, then ran a memory cleaning utility to free up every bit of RAM available (got back up to 1GB free or so), and then the app runs in the Simulator without a hitch. No more Springboard error.
I hadn't seen "too little RAM" listed as a reason for this error yet, so this may be useful for somebody else.

Springboard is the app that launches apps. It's the home screen of the iPhone. I had tons of problems when I tried to get my app running on the phone -- turns out that I had an older version of the SDK that was incompatible with the version of the OS my phone had. Reinstalling the latest SDK did the trick.
Also, have heard that clearing the XCode cache sometimes helps (didn't for me) -- XCode menu->Clear cache...

Maybe this will help: http://discussions.apple.com/thread.jspa?threadID=1605042&tstart=72
I had similar issues when I was trying to install my current development on the iPhone and this information about the AppID fixed it.
For quick reference, the AppID you created when you started creating certificates for development and provisioning of your iphone asked you to create a reverse domain name identifier. Something like: QS32H9XPNE.domain.subdomain.companyname.*
To correctly link up your application to the AppID would require you to set the identifier in the application to domain.subdomain.companyname.application.*
Hope this helps

I had the same problem but this solution works...!!!
1)Deleting the app from simulator.
2)Quitting simulator.
3)Restart simulator.

XCode menu->Clear cache solved my problem.

This happens to me when i switch from testing on the device to testing on simulator. Restarting Xcode and simulator gets rid of this error for me.Silly.

I initially solved this by restarting the iPhone Simulator. But this shouldn't be the answer.
The error came from editing the info plist.
Check that you didn't change any values that were set before provisioning your app for your device.
I wanted to change my Bundle Identifier, but had to go back to the default one after having this error.
Now it's fixed.
Next step will be to get a new provision Id with the Bundle Id changed.

I had same problem, the Simulator would just hang. This is on a fresh install of XC 3.2.5 GM and using Simulator with 4.2 SDK. Apps would run fine on a real device but the simulator would just hang.
I ended up changing the iPhone App Support directory and all sub dirs to 777 access permissions. Not a great idea to 777 -R, but I was desperate and it worked.
$sudo chmod -R 777 ~/Library/Application Support/iPhone Simulator/

For me this was solution. If you have enable background fetch mode. Remove this option if you are getting this alert during run app in simulator.

I had the same problem.
It happens as follow...
I had a folder storing images in some sub-folders.
If I add the root image folder as "directory", I receive this error.
If I add the root image folder as "group", simulator runs fine.
weird...

It happens to be related to folder name as well. My image folder was originally named "contents" and I got the error described.
Changed the folder name to "image_files" and reimport it to Xcode project as "folder". It works!
This is totally random...

That did it for me, too:
This happens to me when i switch from
testing on the device to testing on
simulator. Restarting Xcode and
simulator gets rid of this error for
me.Silly.

When a home directory mounted in NFS you have the problem with the simulator.
To get rid of it, you need to to create a couple of directories in some local place where you have permissions to write, "iPhone Simulator" and "Interface builder". Then remove "~/Library/Application Support/iPhone Simulator" and "~/Library/Application Support/Interface Builder 3.0". And finally create symlinks at the exact places of the removed directories pointing to the local directories.

For mine, I got the error when I tried to change the App bundle ID setting in my info.plist file for the sake of running a test. Changing it back cured the problem, but didn't do me any good for the test. Thankfully, the app had loaded in the simulator and I ran it manually for my test.
As far as I can tell, the problem stemmed from having a bundle ID that matched both a specific ID and a wild-card ID. The App IDs I've tried that match only a specific ID/Profile haven't shown a problem.

Check your console and you will get a better idea of what the error might be. That error number is pretty generic. In my case I had an error in my Plist file. I chenged something that I shouldn't have. But I realized this was the problem because the console had a more detailed error message:
2010-09-13 23:30:27.149 Appname[5580:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:
... and it goes on.

I have had this problem frequently, and generally just quitting and restarting Xcode works.
However, I just had this problem again and nothing seemed to fix it - quitting the sim, Xcode, rebooting… What was strange was some targets worked (I have multiplied build targets for this project), and other projects worked. But one target failed to launch no matter what I did.
In the end, I found the problem: In the target's properties the executable name $[EXECUTABLE_NAME] got accidentally deleted ! Replace it, and it works.
Worth remembering…

I got same error. This is how i solved it. Hope this helps.
To show all hidden files type below from command line
$ defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder
Access DerivedData folder and delete it's content(under DerivedData). Basically this is Simulator Cache which sometimes does not get deleted from XCode. Library is a hidden folder
and that is why we run Step 1.
/Users/your username/Library/Developer/Xcode/DerivedData

Quit and re-open simulator , it will work i also got an issue like this and this helped me.

I am facing the exact same issue very frequently, what I do is
1) I quit the iphone simulator
2) and if after following step 1, if issue still the same, then reset the simulator
And it has resolved my issue all the time from step 1 itself.

Related

Error launching remote program: No such file or directory

Anyone have an idea about this
Error launching remote program: No such file or directory (/Users/muself/Library/Developer/Xcode/DerivedData/myproject-hlelojuljidnnagbdqzliazpdgmn/Build/Products/Debug-iphoneos/myproject.app/myproject).
The project was working fine with the previous Xcode versions. I have just updated the Xcode to Version 4.3.2 (4E2002), & the error start coming.
I have search on the web, and tried a lot of the options like
Quit Xcode, clear the Derived Data folder, restart the Xcode.
Rename the project,
Reset the device,etc
I also tried this on another machine but did not work, the same problem occurs.
But one thing i have some other projects as well and they are working fine.
Thanks for at least reading this.
First try restarting Xcode. If it doesn't work, then try hard reset of your device. This happens to me when I change the bundle identifier of my app.
This solution,I found of the above problem its working fine for me.:)
have you tried to "validate settings" (button on the bottom of project settings)? Do you use some static libs in your app? – Vov4yk
Check your deployment target. I am running Xcode 4.5, and it gave me that cryptic message, while the reason was that my iPad is running version 5.1.1, and my app was set with deployment target of 6.0.
I also get same problem. This below solution works for me.
Thats really annoying. This error happens in a number of different situations. Sometime restarting the Xcode, fixes the problem. If not, follow these steps:
Disconnect your device.
Delete the app from your device.
Quit xcode (Don't just simply close the window, quit it)
Delete derived data folder (~/Library/Developer/Xcode/DerivedData/APPNAME -gbrvhlvwmpiobxdujegtghggrffp - or something like that)
Now start Xcode, connect device and run the project. It should work fine.
Source: http://dhilipsiva.com/2012/07/24/xcode-could-not-launch-app-no-such-file-or-directory-error.html
Hard reset of the device fixed it for me. i.e. power off and back on.
Quitting Xcode, disconnecting, reconnecting the device etc didn't.
The error occurred just after I had created a new project with the a duplicate Bundle Identifier to another. Both apps coexist OK on the device/ in Xcode, but this does seem to cause the above issue.
I saw this when I let the build configuration set up as ad-hoc. After I put it back to Debug it worked fine.

Error : failed to launch, when running on ipad

After much frustration I've finally got an application to run on an iPad without errors. However it doesn't run. It gives the following error. My application does run on the simulator but doesn't run on an iPad and gives the below error. I'm really not sure why. I went to the described folder the structure of the folder is as follows.
Products
.DS_Store
Debug-iphoneos
.DS_Store
sampleproject.app
sampleproject.app.dSYM
Debug-iphonesimulator
.DS_Store
sampleproject.app
sampleproject.app.dSYM
error: failed to launch '/Users/x/Library/Developer/Xcode/DerivedData/sampleproject/Build/Products/Debug-iphoneos/sampleproject.app/myProject' -- No such file or directory (/Users/x/Library/Developer/Xcode/DerivedData/sampleproject/Build/Products/Debug-iphoneos/sampleproject.app/myProject)
Just had the same error on Xcode 4.3.2, with target iPad3 5.1, but was able to build and run on my device after these steps:
Deleted my DerivedData directory (emptied trash too)
Quit XCode
Disconnected iPad USB
Rebooted Mac
Rebooted iPad (power down and back up)
Reconnected iPad USB.
Restarted Xcode with project
Confirmed build for debug on device selected.
Clicked Run
I've no idea whether all these steps are mandatory. This is a crummy answer, since it neither explains the problem, nor offers a sure fix. I expect better of Apple; I've looked for a better answer, but found nothing.
Rebooting to solve problems is no solution! OTOH, it let me proceed on with my work, so...a small blessing.
Deleting the DerivedData directory and restarting Xcode worked for me. Simple restart of xcode did not.
Following Tarryn's suggestion to delete DerriveData leads to another problem "No Code Sign found", which brings my attention to the Code Sign section in my Build Setting. The Code Sign for Debug is set to "Don't Allow". Changing it back to my iOS developer profile solves the issue.
If anyone gets this problem and follow the path Tarryn suggested, there is one more step you can try to work this out.
Very frustrating, but in the end a simple exit XCode and restart XCode seemed to clear the issue.
Firstly quite the Xcode and restart, it'll run finely..
restarting the Mac fixes for me.
under /DerivedData: rm -r sampleproject
-> disconnect ipad -> reboot ipad -> reconnect ipad
-> quit & relaunch XCode
it worked for me, hope it helps!!!
Restart Xcode and it works again.
Another cause of this problem
Selecting the wrong mobileprovisioning profile. For example you can have a Distribution profile selected in Debug mode, Xcode will then not allow the app to start in debug mode.
To fix this
Select your project file in Xcode
Choose "Build Settings"
Search for "code signing"
Confirm that a Development profile is selected for "Develop" builds
It sounds like the target is not necessarily set up correctly. What is the name of the Target? I see "Virgin Atlantic" there, but the project root is "sample project"?
It happened to me using Xcode 7.1.1 with OSX Yosemite.
Followed all steps of #tarryn (the accepted answer) but did not restart my mac. Restarting the mac eventually solved the problem for me.
Disconnecting the iPad and reconnecting it just worked for me.

Error in Xcode getting debugging info from 5.0.1 iphone

I´ve found a strange issue with latest XCode 4.2 when trying to deploy my app to an iphone that just upgraded to 5.0.1.
It starts copying the debug info and the progress moves until the end, although it does not move beyond 'copying file 2 of 9'.
After it's done I get the message:
Xcode has encountered an unexpected error (0xC002)
No such file or directory, at ‘/SourceCache/DTDeviceKit/DTDeviceKit-867/DTDeviceKit/DTDeviceKit_Utilities.m:864’
in the organizer window. Any similar experience and clue on how to get over it?
Needless to say every party involved has been restarted dutifully, including myself.
Thanks for all your help
I found the following post helpful, although it is kind of dated:
https://stackoverflow.com/a/9944892/1031623
The only thing that I had to change is the following:
Close Xcode
Go to: "~/Library/Developer/Xcode/iOS DeviceSupport/5.0.1(9A405)/Symbols/System/Library/Caches/com.apple.dyld/"
Note: if you
don't have this folder, run Xcode, connect your device, and wait
until the error 0xC002 appears in Organizer - the folder should be
created by that time.
Create 3 empty files there called:
.copied_dyld_shared_cache_armv7 <== not 6
.processed_dyld_shared_cache_armv7 <== not 6
dyld_shared_cache_armv7 <== not 6
Run Xcode and enjoy the light next to your device eventually go
green:)
I have found a potential fix. I tracked the issue down to some files not copying into the ~/Library/Developer/XCode/iOS DeviceSupport/5.0.1(9A405)/ folder. I borrowed a friend's iPad with the 5.0.1 update, and attempted to use his device for development. It worked fine, and I noticed my iOS DeviceSupport/5.0.1(9A405) folder suddenly had many, many more files. I then connected my problematic iPad and bam, it just worked.
I attempted restoring, recovering, etc. and I could not fix the issue with these methods. I did the OTA update, and so did my friend, so our iPads were updated in exactly the same way. I do not have any explanation of the issue, but at least I have found a workaround.
If you don't have access to another device with the files, here's a zip file of them:
http://www.enemyhideout.com/ios/5.0.1%20(9A405).zip
Delete the ~/Library/Developer/XCode/iOS DeviceSupport/5.0.1(9A405)/ folder.
Then connect your device and go to the Organizer.
Xcode should recreate that folder and fill it up with informations from your device.
Thank you #Chris Hill, I was running into this on Xcode 4.3.1, but instead of
.../DTDeviceKit-867/... I was getting .../DTDeviceKit-1197/...
At first I replaced all the files mv -f ~/library/... and started up Xcode again, I deleted all the files I placed there from your pkg, So I tried with Xcode open, iPhone plugged in; and it worked perfect!
Thanks again

App won't launch on device or simulator

So... this is beyond strange.
I had an app that was running perfectly fine in simulator and on device. I've actually already submitted the app and it is for sale in the App Store.
Today I went back in and made a few changes for an update.
The app now will not load on my device and it won't load in the simulator.
In the simulator it says "Attaching to app_name" (it lists the actual app name) and it stays on this process of "Attaching" indefinitely, while the Simulator screen is entirely black.
When running the app on the device it says "Build Succeeded", then "Finished running app_name" without anything ever showing up on the device.
I restarted XCode and tried restarting my computer, but still no luck...
Other apps do work, but not this one.
Any ideas?
EDIT: I just started a brand new project, copied over all the assets and code, tried running and STILL the same thing happened. I thought for sure creating the project anew would work...
FINAL EDIT: After running "Clean", deleting the DerivedData folder, and restarting my computer a SECOND time, the new project (with all assets copied over) is now working. The original project still does not work. So I am not sure what caused the issue and what fixed the issue, but for me at least I can now move on. What do I do with this thread? Can it just be deleted? Thanks everyone who chimed in to try and help!
Tried above options but didn't work for me.
Finally, Just Resetting Simulator did the trick.
In the options move the DerivedData into your project directory. Whenever I have problems with xcode4 I just quit it and delete this directory. It contains the builds and caches of the background compiles that xcode4 does.
Deleting this folder usually fixes all problems I get.
Try cleaning your project. In Xcode 4: Product menu >> Clean.
Why don't you try this one.you can quit the simulator and run the project again.This works for me
There are a lot of different solutions people suggest for this:
Do a clean
Reset simulator
Do a 'clean build folder' (hold down option key when selecting clean)
Remove ~/Library/Developer Tools/Xcode/Derived Data/YourProject*
Remove your 'xcuserdata' directory inside your .xcodeproj directory
I just spent an hour trying different combinations of the items above, doing all of them, ... nothing worked. My app would either 1) Immediately start and quit before launch screen would show up, or 2) Hang at launch screen. The simulator took forever to reset, sometimes wouldn't respond to a Quit, ... Just really odd stuff going on.
This solved my problem: Reboot machine.
(It blows my mind this had to be done on Mac OS, but it worked. This may have something to do with upgrading to XCode 4.6 and not rebooting since then, I'm not sure... But I'm back running again)
Tried all posts here without success. Then I found something that worked for me:
I had a ~3000 resources folder in my Xcode Project.
At first I had them as "folder reference", which made XCode unable to launch the app.
When I switched them to be a "group" in the project, the error was gone.
I still needed to restart Xcode and the Simulator and rebuild, but it worked.

Failed to launch simulated application: iOS Simulator failed to install the application

When I create a new window based application, I get:
Failed to launch simulated
application: iOS Simulator failed to
install the application.
I tried to do what this post suggest, but didn't work
Any suggestions? I haven't tried re-installing xcode yet.
Choose Reset Content and Settings in the File menu of the Simulator.
Build Clean in Xcode
Then try again.
I'm not sure why, but rebooting my machine seemed to fix it.
I had the same problem. A reboot also did the trick, but then I realized that the directory
~/Library/Application Support/iPhone Simulator/6.1/
looked "different" after the reboot (Directory "Root" was missing). So I tried to reproduce the error by deleting the directory or parts of it. The simulator each time recreated the directory and worked fine. Maybe the reboot is not really needed just recreating the mentioned directory would also help.
Try to delete project.xcworkspace file and xcuserdata dirctory in your project
It seems that the processes don't get cleaned up properly each time you stop the app with ps aux in Terminal showing a large number of processes representing your app on the simulator.
I expect some kind of upper limit is reached with the number of processes / memory. (Indeed I have found that XCode will fail to build because some posix resource can't be found because there isn't memory to load it)
A machine restart clears all of these dead processes and allows room for new ones. For me, I only have to do this after about 2-3 weeks of not turning my computer off, but I suppose what resources you have and how often you use the Simulator will affect it.
If someone knows how to clear all these dead processes without restarting, that would be useful please, killall ... doesn't seem to have worked for me, but feel free to add to this answer.
Simply go the info.plist file property and set 'Copy to Output Directory' to 'Copy Always' it will resolve your problem.