18

I downloaded Xcode 9 beta recently, and when I tried to run my app in the simulator it is not getting installed. I am getting this error in my Xcode every time I try to run the app.

This app was unable to be installed.

enter image description here

The application used to work in Xcode 8.3.3

pkamb
  • 33,281
  • 23
  • 160
  • 191
Akshay Sunderwani
  • 12,428
  • 8
  • 29
  • 52
  • Have you been able to solve this issue? If so, what were the steps to be able to install the application again? – rodalfus Jul 10 '17 at 08:55
  • @rodalfus I didn't find any solution for this, I removed Xcode 9 and reinstalled Xcode 8.3. – Akshay Sunderwani Jul 11 '17 at 11:12
  • Possible duplicate of [XCode 9 beta showing error when app launch](https://stackoverflow.com/questions/44517741/xcode-9-beta-showing-error-when-app-launch) – AlexVogel Jul 19 '17 at 18:52

12 Answers12

23

Unfortunately, the error message doesn’t explain why the install failed. You can take a look at ~/Library/Logs/CoreSimulator/CoreSimulator.log to see if the rest of the error message is there with more info. If not, you should check out the sim device’s system log:

sudo xcode-select -s /Applications/Xcode-beta.app # if you haven’t already
xcrun simctl spawn booted log show

You can use --predicate to filter that down a bit.

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
  • Ok, I will check that. Thanks for help. – Akshay Sunderwani Jul 02 '17 at 20:58
  • 5
    Turns out my app extension did not have a valid `CFBundleVersion` string. Thanks for this tip. – dalton_c Sep 14 '17 at 22:22
  • 6
    In my case I didn't have matching bundle identifier for watch and extension. I have renamed original app's one some time ago, but forgot to rename in other targets. Command that I have used was: `xcrun simctl spawn booted log show | grep "This app was unable to be installed."` – Anton Matosov Oct 01 '17 at 08:29
  • 1
    This should be accepted answer, since it's the only way to figure out the actual reason for the error – Aleksandar Vacić Oct 26 '17 at 12:15
11

Late answer but might be that can be useful for others. I just get a project with existing watch-kit and custom keyboard code. After change the identifier i got the same error and i spend 1 day to find out why that happens.

I checked everything of bundle id and all version. then i do global search in xcode with old identifier and i found that following.

enter image description here

Here in both .plist file have old WKCompanionAppBundleIdentifier so after i update it with new manually application run again.

IMPORTANT NOTE:

IF YOU ARE JUST CHANGE IDENTIFIER FROM GENERAL TAB THAT DOES NOT MEAN IT UPDATE AT ALL. KINDLY CHECK WITH ALL POSSIBLE PLACES BY SEARCH AND REPLACE IT WITH NEW IDENTIFIER.

XCODE VERSIO: Version 9.0 (9A235)
Nitin Gohel
  • 49,482
  • 17
  • 105
  • 144
2

I ran into this same issue and a quick click on Product > Clean did the trick for me!

1

If you are using CocoaPods in your project please have a look at this answer: https://stackoverflow.com/a/44533287/221194

Changing the status of the pods subdirectory helped me with my project.

AlexVogel
  • 10,601
  • 10
  • 61
  • 71
1

I had a similar issue when installing my App on the IOS simulator (with Xcode 9).

I found the issue (at least for my case), it was due to an unauthorized key (Privacy - Location When In Use Usage Description) in the info.plist of the Watch App.

I have moved this key to the info.plist of the WatchKit Extension and now the App installs again.

I hope it will help others people having the same issue.

sebastien
  • 2,489
  • 5
  • 26
  • 47
0

change deployment target as per requirement. select project > GENERAL > DEPLOYMENT TARGET also check ios version of your device

Bhawin Ranpura
  • 129
  • 1
  • 8
0

I had the same issue. Log shows it's an error caused by Google Signin:

FunctionName=-[MobileInstallationHelperService stageItemAtURL:completion:], SourceFileLine=392, NSUnderlyingError=0x7f891e9a1270 {Error Domain=MIInstallerErrorDomain Code=4 "Failed to remove ACL" UserInfo={NSLocalizedDescription=Failed to remove ACL, FunctionName=-[MIFileManager _removeACLAtPath:isDir:error:]

However it works on iOS 9 & 10 simulator.

Bonan
  • 709
  • 4
  • 18
0

I got same error and I was using Cocoapods in my project and for me help just update pods.

Libor Zapletal
  • 13,752
  • 20
  • 95
  • 182
0

I ran into this issue in Xcode 9.0 beta 5 after renaming a project that contained an iOS and watchOS app. To fix, I recreated the iOS target.

Justin Domnitz
  • 3,217
  • 27
  • 34
0

This issue could be triggered by multiple things however if you take a look at the logs at ~/Library/Logs/CoreSimulator/CoreSimulator.log and it states an error that reads :

NSUnderlyingError=0x7fb51c271ee0 Could not hardlink copy /originPath to /destinationPath

it's possible that your Build number in your Project Target's settings is set to empty.

Go to Project Target > Identity > Build and set a Build number. You'll have to uninstall the the app in the simulator and re-install it before installing updated versions.

LuFFy
  • 8,799
  • 10
  • 41
  • 59
0

Please check the bundle identifier to solve the issue.

0

I had the same issue on XCode 9.3.1 when I wanted to add google map framework to my project manually.

To fix the problem I remove the google frameworks from Embedded binaries...

enter image description here

Ahmadreza
  • 6,950
  • 5
  • 50
  • 69