每次我切换模拟器时,Xcode 5-“ iOS 模拟器未能安装应用程序”

使用 Xcode 5 GM,每当我切换到5.1、6.0或6.1模拟器进行测试时,都会出现“ iOS Simulator 未能安装应用程序”的错误当我重新设置模拟器时,它工作正常,但这是非常累人的。

有人有永久性的解决方案吗?

39615 次浏览

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

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.

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

To check your Executable file settng ex.$(EXECUTABLE_NAME) (Project setting - info property page)

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!

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.

Deleting the app in the simulator works for me. just wanted to add that this happen only if I open xib that created in xcode 4.6 If it's other files, this not happen

I have different issue when getting error message “iOS Simulator failed to install application”, the reason is because I have added a property in App-Info.plist without any value. For instance, [Application Category] with no value. Thus the error will show up as well.

When I got this error, the image of the phone actually appeared, but the image of the app I wanted to test did not. Instead, I was on the main page of the phone that shows the apps you have. I fixed this problem by deleting the many icons that appeared on the start screens - about 30 of them. These had been created when I testing apps over the months. So, not saying its a solution, but it started working after I deleted the old app images.

try this ....

in my case nothing have worked for me , after resetting the content simulator also , i am not able to install the app on simulator . after that i just changed my project location . i just moved the project to other location . then it installed successfully.

/Users/YOURUSERNAME/Library/Developer/Xcode/ --> remove all contents of this folder, then simply launch the app from Xcode.

None of the above things worked for me. I just reinstalled xcode and it worked.

Ran into this issue today. Found it was an empty Reference Folder (blue folder) causing this. Removed the folder from Resources in Build Phase... cleaned build folder for the heck of it, and it went away.

i got the same problem but solved by following way....

  1. Launch the iOS Simulator

  2. Go and click "iOS Simulator" menu

  3. Click "Reset content and settings"

  4. Close simulator and rebuild your app.

enter image description here

Above screen shot is showing the way how you can do this...

I think this works for you...!!!

For me it was -framework XCTest.

It made the app die with iOS Simulator failed to install application

and on the device Could not inspect the application package.

Removed it and now works.

You are using Xcode GM which is under beta stage. Use latest Xcode 5.1.1 available. Also, these error occur while switching between simulator (32 bit and 64 bit).

  1. Quit the simulator and re-build the application. OR
  2. Reset simulator from "iOS simulator" -> "Reset content and settings.."

Error

I changed my app name and bundle id midway. I happened to delete the Executable File name in my plist. I changed it back to "${EXECUTABLE_NAME}" (no quotes) and I'm back in business.