iOS Simulator failed to install the application

Ios SimulatorCordovaxcode4.5

Ios Simulator Problem Overview


I have created a Cordova 2.1.0 app, It ran fine for the first 2-3 times. But now when I am trying to run it through terminal it is giving me the following error.I didn't change anything.

Ankurs-Mac-mini:~ ankur$ /Users/ankur/Desktop/CordovaSMS/cordova/emulate 
Ankurs-Mac-mini:~ ankur$ 2012-10-17 16:11:08.695 ios-sim[7032:507] stderrPath: 
/Users/ankur/Desktop/CordovaSMS/cordova/console.log
2012-10-17 16:11:08.698 ios-sim[7032:507] stdoutPath: 
/Users/ankur/Desktop/CordovaSMS/cordova/console.log
[DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain 
Code=1 "iOS Simulator failed to install the application." UserInfo=0x7fc643902320 
{NSLocalizedDescription=iOS Simulator failed to install the application.,
DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}

any help would be appreciated. Thanks

Ios Simulator Solutions


Solution 1 - Ios Simulator

Solved the problem

Deleting contents of ~/Library/Application Support/iPhone Simulator and re-run the project solved this problem. or you can simply reset content and setting of the simulator.

enter image description here

Solution 2 - Ios Simulator

Try manually launch the iOS Simulator and from the "iOS Simulator" menu, click "Reset content and settings", then close and rebuild your app.

enter image description here

Solution 3 - Ios Simulator

My solution is:

reset

From menu, iOS Simulator, Reset Content and Settings. Close XCode 5.0: close project and close it from Dock and re-open the project and launch again, like in Windows :)

Solution 4 - Ios Simulator

I tried everything mentioned above and nothing worked. My problem was iOS 7 specific. I was finally able to resolve the issue by assigning a non-empty value to Bundle versions string, short (CFBundleShortVersionString) in the -Info.plist file. Looks like iOS 7 doesn't like an empty value for the build number. I had a script that auto increments the bundle number by 1 every time I build the project so this field was empty. I just assigned a dummy value there to get it working.

Solution 5 - Ios Simulator

You can also remove the app from the simulator.

This worked for me in iOS6.1

Solution 6 - Ios Simulator

Solved here: https://stackoverflow.com/a/16279286/1927253

I copied a folder into XCode 4.6.2 with the name "Resources". When XCode asked, I created the folder references for any added folders.

Every time I did this, I would have to goto the Derived applications directory, and delete the build directory for my project to get it working again.

Solution: Do not copy a folder by reference into XCode with the name "Resources". Rename it to something else other than Resources.

Very annoying error.

Solution 7 - Ios Simulator

just reset your simulator and re-run your project

Solution 8 - Ios Simulator

Unfortunately none of these solutions solved my problem. I did everything, even restarting my mac but it was still failing. What actually did solve my problem was to go to the Organizer and delete the Derived Data and Snapshots.enter image description here

Solution 9 - Ios Simulator

Had the same problem after installing XCode 5. Had no iOS 6.1 Sim or SDK. Obtained these. Tried to run the App up under the iOS6.1 Sim and go the failed to install message. Having read through all of the above posts, I decided to simply remove the App from the Simulator and re-istall, re-run from the project window and that solved it for me.

Solution 10 - Ios Simulator

I tried ALL these things and more including reinstalling Xcode 5 and nuking every xcode and simulator preference/application support file with no luck.

Then for the hell of it, I CHANGED my short bundle version string (it already had a value, it was not empty), and it fired right up.

3 hours gone but yeah

Solution 11 - Ios Simulator

All the answers I looked for do not work for me!. Finally The only way to make it work is as follows

  • 1.Check the version of titanium being used for the project in tiapp.xml
  • 2.right click the prject in the project explorer window.
  • 3.Select Properties
  • 4.Choose project build path. Select Titanium Mobile SDk all versions of 3.* Tick all of them.
  • 5.Now click apply and re run the project.

Solution 12 - Ios Simulator

None of the above worked for me, I finally compared my info.plist to another project and found that I had somehow deleted the "Executable File = ${EXECUTABLE_NAME}" key/value pair, replacing it fixed the problem for me.

Solution 13 - Ios Simulator

This error occurs on iOS 7.0 if you leave the "Build" empty. Enter a build number!

Solution 14 - Ios Simulator

What worked for me was to simply delete an old version of the app, which was made in a prior version of Xcode (likely 4, now running 5) from the simulator (tap-hold, jiggle, x).

Solution 15 - Ios Simulator

I encountered this problem while trying to create a build for Facebook application approval. I found that for some reason, when I used the following command line:

xcodebuild -arch i386 -sdk iphonesimulator7.1 -scheme Mana -configuration Release

the files didn't end up in [project root]/build/... (as the instructions on Facebook suggest), but in ~/Library/Developer/Xcode/DerivedData/[app name + unique identifier]/Build/Products.

I'm not sure exactly what's going on here (anyone who knows more please enlighten me!) but I was able to run the files in the DerivedData directory on the simulator. Hopefully they'll also work for Facebook!

Solution 16 - Ios Simulator

I tried everything mentioned above and nothing worked.

Finally the only way to make it work was unsetting DYLD_INSERT_LIBRARIES=/usr/lib/libimckit.dylib

How I did this:

  1. Open terminal and typing "sudo vi /etc/launchd.conf"
  2. Changing

"setenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"

to

"unsetenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"

  1. Save changes
  2. Reboot your system

In this post [1] explain what DYLD_INSERT_LIBRARIES is for

[1] https://stackoverflow.com/a/26053165/2091181

Solution 17 - Ios Simulator

On Mavericks 10.9.5 using Xcode Version 6.0.1 (6A317) with an iOS SDK supporting 8.0 originally had Simulators all version 8 all getting this error. All the advice above was not working for me. So went to Xcode->Preferences->Downloads and saw as installable (but not yot installed) in the Components section were iOS Simulators 7.1 and/or 7.0. Went ahead and installed the 7.1 Simulators and got extra designations on the Product->Destination list Simulators of version 8.0 and 7.1, and using the 8.0 still had the same error, but the 7.1 Simulators all worked.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAnkur AryaView Question on Stackoverflow
Solution 1 - Ios SimulatorAnkur AryaView Answer on Stackoverflow
Solution 2 - Ios SimulatorAbdul YasinView Answer on Stackoverflow
Solution 3 - Ios Simulatoruser529543View Answer on Stackoverflow
Solution 4 - Ios SimulatorindiantroyView Answer on Stackoverflow
Solution 5 - Ios SimulatorxarlyView Answer on Stackoverflow
Solution 6 - Ios SimulatorRobert WasmannView Answer on Stackoverflow
Solution 7 - Ios Simulatorhardik hadwaniView Answer on Stackoverflow
Solution 8 - Ios SimulatorappostolisView Answer on Stackoverflow
Solution 9 - Ios SimulatorCarl HineView Answer on Stackoverflow
Solution 10 - Ios SimulatorPaul BruneauView Answer on Stackoverflow
Solution 11 - Ios SimulatorSarveshView Answer on Stackoverflow
Solution 12 - Ios SimulatorPatrick T NelsonView Answer on Stackoverflow
Solution 13 - Ios Simulatoruser3897822View Answer on Stackoverflow
Solution 14 - Ios SimulatorEPage_EdView Answer on Stackoverflow
Solution 15 - Ios SimulatorJeremy WarneView Answer on Stackoverflow
Solution 16 - Ios SimulatorJorge CasariegoView Answer on Stackoverflow
Solution 17 - Ios SimulatorRobert MetcalfeView Answer on Stackoverflow