Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators

39,575

Solution 1

Looks like this is a known issue. From the Xcode 5 release notes:

After switching the minimum deployment target of an application from iOS 7.0 to a release prior to iOS 7.0, building and running the application may fail with the message “iOS Simulator failed to install the application.”

  • Go to the iOS home screen, click and hold the application icon, then tap the hovering “X” button to delete the application. 13917023

Another release note:

iOS Simulator

  • If an iOS app is detached, relaunching the same app from Xcode will result in a black screen in the Simulator even though the new app is launched. Terminate the app in the Simulator or relaunch it for the second time. 14648784

Solution 2

Delete the old version app in your simulator (usually iOS 6.x).

Solution 3

Alternatively, header over to iOS Simulator - Reset Content and Settings.

This can be easier when you have a lot of apps on the simulator and can't remember which one you're currently working on.

You need to do this for every iOS Simulator version that causes the problem.

Solution 4

if you have already developed project and you used xib to develop views then

X-Code > Inspector Selector Bar > Interface Builder Document > opens in > and change from Xcode Default(5.o) to Xcode 4.6 .
enter image description here
Build and Run your app it will run successfully, if it won't run again then, header over to iOS Simulator - Reset Content and Settings. delete old app from simulator then Run again.

Solution 5

None of the other suggestions worked for me. However, after comparing my existing app settings to a new vanilla project, I noticed that the "Build" field for my Target was blank. Once I put something in that field, the app installed just fine!

Share:
39,575
Tom Redman
Author by

Tom Redman

iOS Developer

Updated on September 21, 2020

Comments

  • Tom Redman
    Tom Redman almost 4 years

    Using Xcode 5 GM, anytime I switch to the 5.1, 6.0 or 6.1 simulators to test, I get the error "iOS Simulator failed to install application." When I reset the simulator it works, but this is getting very tiring.

    Anybody have a permanent fix or workaround?

  • DanielR
    DanielR almost 11 years
    Using the hint from TRedman I changed the deployment target from 5.0 to 5.1 and the error is gone (for now). I ran the application ten consecutive times and no error message.
  • Bagusflyer
    Bagusflyer almost 11 years
    Unfortunately the simulator always in black screen even when there is no application running at all.
  • Tom Redman
    Tom Redman almost 11 years
    @bagusflyer Please see the edit to the answer. Sound like it's another known issue.
  • Tom Redman
    Tom Redman almost 11 years
    I'm running into this randomly: some projects exhibit this behaviour, others don't. So I can't mark this as correct unfortunately.
  • Den Telezhkin
    Den Telezhkin almost 11 years
    This is happening since developer preview 1, i think. Error message "iOS simulator failed to install an application" pops up even when application is not installed on simulator. There's no application to remove, and error does not go away for one of my projects. For other projects it's fine. Resetting simulator, removing derived data and cleaning does not help.
  • Steven Kramer
    Steven Kramer over 10 years
    Thanks, that did it (I had previously deployed the app to the 5.1 and 6.0 Simulators using Xcode 4)
  • deko
    deko over 10 years
    Brilliant! That worked for me after I'd reset simulator content and removed all applications data manually many times!
  • Preetam Jadakar
    Preetam Jadakar over 10 years
    I am getting same issue for iPhine(4 inch retina) what should i do?
  • Preetam Jadakar
    Preetam Jadakar over 10 years
    Simply Brilliant...! you allowed to leave office now.
  • shah1988
    shah1988 over 10 years
    man! awesome. I had been sitting behind this issue for quite a long. Thanks a lot.
  • Jake
    Jake over 10 years
    Where can I find the 'Build' field for my Target?
  • Robert Altman
    Robert Altman over 10 years
    For me, this seems to be associated with switching between running in the simulator for iOS6 and iOS7; iOS7 works reliable and iOS6 works only after a reset or after deleting the app (deleting the app is much faster than reseting the simulator). @TRedman, Thanks for asking and posting this answer. Too bad Apple left us to clean up there mess.
  • Yas Tabasam
    Yas Tabasam over 10 years
    It can also happen if Build field in your project settings is empty, does not have a number. Make sure to have at least 1.0 in it.
  • z33
    z33 over 10 years
    Where is the "Build" field??
  • grandouassou
    grandouassou over 10 years
    Another trick about the black screen if you know the app is running, you can go back to Home screen and tap the app icon and you will see the app as expected. Works most of the time.
  • Raunak
    Raunak over 10 years
    Nothing described here worked for me. Finally I just restarted my machine and it worked.
  • JOM
    JOM over 10 years
    Basically you reset the simulator content: open simulator, choose "iOS Simulator" from (Mac OSX) menubar and "Reset Content and Settings..." submenu item.
  • cate
    cate over 9 years
    Does this mean location of folder enclosing project in Finder hierarchy? If so, doesn't work from me (my search continues...)
  • Shaik Riyaz
    Shaik Riyaz over 9 years
    @cate yes , in my case i moved the folder from documents to desktop , it worked for me