Xcode: "This app could not be installed at this time."
Asked Answered
D

32

77

Working with my first application for learning purposes. It goes well but has met into a problem with Xcode. When I try to run the application on the iPhone simulator this message always pops up "This app could not be installed at this time."

screenshot

What is wrong? There are no errors when trying to build the app. Has tried to clean the build. Reinstall pods. Restarted Xcode. Erased all settings on the simulator device, however, the problems still exist.

The error message does not give me any information. Is there another logfile I could look into or something?

Dumps answered 11/12, 2017 at 20:10 Comment(5)
What's wrong, you ask? Xcode is buggy. Quitting Xcode and restarting it often helps.Ayacucho
Hah! I did find the soultion right after posting this post. The errors was something with a plist file. Found the error in the log file located at ~/Library/Logs/CoreSimulator/Dumps
@PureRushh Can you give more details? Maybe describe what happened as an answer to your own question. Might help someone else.Politic
Check the running simulator,delete your app has installed at first.I resolve my problem throngh this way.Frieda
Force Quit Simulator and Build And Run Xcode it's working !!Wary
D
83

I managed to find the problem. The problem was that I had added some keys to a property list file that was not valid. I found the error by looking in the log file that was located here: ~/Library/Logs/CoreSimulator/

Dumps answered 11/12, 2017 at 20:49 Comment(5)
Solved my problem which was due to localisation having stalled part way through leaving an Info.plist in the wrong place.Bustos
Thanks, this was really helpful. Perhaps instead of giving us this useless and frustrating error message, Apple could suggest checking the simulator logs, even if it's left to the developer to identify the exact error.Crochet
My log had the underlying error that I had a bad key in Info.plist. THANK YOU!Obregon
The file named: CoreSimulator.log in ~/Library/Logs/CoreSimulator/ directory.Hite
Ran into this problem again. The simulator log in the Simulator app wasn't reporting any problems. Simulator -> Debug -> Open System Log.... Only going to CoreSimulator.log with tail -f ~/Library/Logs/CoreSimulator/CoreSimulator.log reported the problem.Obregon
S
79

Reset the simulator:

Hardware -> Erase All content and settings...

Clean your project:

shift+cmd+K

shift+opt+cmd+K

This should fix your issue

Seventeenth answered 20/12, 2017 at 10:37 Comment(4)
FWIW: I only had to clean the project for the app to install again.Damascene
Fixed it for me. How annoying.Topazolite
@Topazolite totally agree! Happy that I helpedSeventeenth
FWIW: I only had to reset the simulator for the app to install again :PMahmud
O
11

I know the question has been answered but for others encountering the same issue I suggest following:

  • Check simulator logs, if its printing something useful. First, selecte simulator then from menu option open Debug -> Open System Logs.

  • Make sure only 1 simulator is running.

  • Delete the older version of app from the simulator.

  • If you importing a custom framework, make sure custom framework->bundle-id is not same as currentAppProject->bundle-id. If you are not sure then simply change the bundle-id of current project.

  • Also some of the simulators can be buggy -> Simply change the simulator, it may resolve the issue, for me changing the simulator worked.

Overtime answered 18/12, 2017 at 10:23 Comment(4)
Deleting the old version of the app from the sim fixed it for me.Annul
For me the problem arise again. Actually, I was creating Umbrella framework and my both frameworks had same Bundle-Identifiers, changing the bundle id permanently fixed my issue.Overtime
In my case, I don't know how they different but the Objective-C project run OK, but Swift doesn'tEwens
In my case "custom framework->bundle-id" was same to the target project.Sylvanite
L
5

Found issue in ~/Library/Logs/CoreSimulator//MobileInstallation

WatchKit 2 app extension's NSExtension.NSExtensionAttributes.WKAppBundleIdentifier value does not match WatchKit app's bundle ID

Lunneta answered 7/2, 2018 at 17:45 Comment(1)
Thanks for the tip. I had this issue after I changed the bundle id but for some reason inside the WKAppBundleIdentifier of the Apple Watch app and the Apple Watch extension the ID was not correctHyperkeratosis
C
5

For anybody wasting time on this obscure error. If you don't have any relevant logs and all the other answers fail, you might check if you recently added a framework that for some reason (didn't investigated why) can't be embedded, only linked. Happened to me with GoogleMaps for iOS.

Corey answered 25/2, 2018 at 23:12 Comment(1)
If you try to use a symlink to a framework you can get this error.Leonteen
O
5

I resolved this issue to remove DerivedData from Xcode Preferences. and also Restart the simulator from Hardware.

Osgood answered 3/4, 2018 at 8:35 Comment(0)
M
5
rm -rf ~/Library/Developer/Xcode/DerivedData/
Melanymelaphyre answered 7/6, 2018 at 10:36 Comment(2)
Can you please explain your answer.Uncovered
I think this is to do with Xcode caches; My error dialog message (the topic of this SO thread) included the details that something in a /caches/ folder could not be found; I recognized the command above from a while back (not sure if it was to solve the same problem) and ran it; fixed the problem for me; a useful command to keep in your xcode toolbox for sure.Gaytan
D
4

Changing the CFBundleShortVersionString in InfoPlist.strings to match the one in info.plist fixed this for me. I had to use the simulator's "Erase All Content and Settings" after making this change.

Trying to launch on a simulator with iOS 9.0 (instead of 11.2) gave this error instead, which helped me to find more answers on what's apparently the same issue:

The operation couldn’t be completed. (LaunchServicesError error 0.)

Distilled answered 5/2, 2018 at 20:49 Comment(0)
J
4

I was seeing this on all simulators and all devices. Uninstalling the app would work once, but it continued to fail on me.

The fix was to wipe out all my project's pods:

pod deintegrate

And then re-install again:

pod install

This was with XCode 9.3 and iOS 11.2/11.3.

Jampan answered 13/4, 2018 at 5:14 Comment(0)
M
3

Just restart simulator to fix it in my case.

Malemute answered 22/1, 2018 at 4:59 Comment(0)
P
3

Occurred to me when I switched branches with another developer who was using a different version of CocoaPods , Deleting derived data folder worked !

Poetess answered 23/5, 2018 at 13:32 Comment(1)
i had a similar situation, deleting derived data worked for me as wellInfuscate
R
2

Just quite the simulator and start again works for me. In my case the error always occur if I change the bundle identifier and run afterwards the iPhone X simulator.

Ruvolo answered 4/1, 2018 at 2:59 Comment(0)
T
2

I encountered this error, but it had nothing to do with my Info.plist or Cocoapods. I had mistakenly deleted a duplicate NotificationServiceExtension group in my Xcode project, which caused me to end up with a NotificationServiceExtension target that had no source files (I only need one source file to integrate/piggy-back off of the Urban Airship SDK's rich notifications).

After reverting the commit where I deleted the duplicate group and then deleting the correct duplicate group (the one that didn't list the source file as being part of the target), I was able to build and run just fine.

Torso answered 9/5, 2018 at 22:47 Comment(0)
A
2

To add a bit of additional info here. While Xcode is completely unhelpful about telling you why the app couldn't be installed, the console has quite good error messages. Just launch Console.app (Applications > Utilities > Console) and filter the output by installcoordinationd.

It'll give you something like this that describes the error:

installcoordinationd -[IXSCoordinatedAppInstall _onQueue_acquireAssertionAndDoInstall]_block_invoke: Installation for identifier:com.acme.location-thingy uuid:blah-blah-blah-foo intent:IXCoordinatorIntentInitiating creator/appDRI:InstallCoordination Simple SPI userInitiated:N state:IXAppCoordinationStateWaitingForInstall> failed: Error Domain=MIInstallerErrorDomain Code=99 "WatchKit v3 app has disallowed Info.plist key: NSLocationUsageDescription" UserInfo={LegacyErrorString=WatchKitAppIllegalInfoPlistKey, FunctionName=-[MIExecutableBundle hasOnlyAllowedWatchKitAppInfoPlistKeysForWatchKitVersion:error:], SourceFileLine=1841, NSLocalizedDescription=WatchKit v3 app has disallowed Info.plist key: NSLocationUsageDescription}

Hope this is helpful to someone!

Ambulate answered 10/9, 2018 at 1:55 Comment(0)
T
2

I encountered this error while developing my first WatchKit app. Followed guidance from @PureRushh, @Antonioni and others to dump the contents of:

~/Library/Logs/CoreSimulator/CoreSimulator.log

The log contents led me to the error.  I'll include the details in case others encounter this error while developing WatchKit apps.

Log message:

com.apple.dt.Xcode[89555] : installApplication:withOptions:error:: Error Domain=IXUserPresentableErrorDomain Code=1 "This app could not be installed at this time." UserInfo={NSLocalizedDescription=This app could not be installed at this time.,NSUnderlyingError=0x7f9ab87d1f20 {Error Domain=MIInstallerErrorDomain Code=101 "WatchKit 2.0 app's bundle ID com.somecompany.AirTime2.watchkitapp is not prefixed by the parent app's bundle ID followed by a '.'; expected prefix com.somecompany.AirTime."

Cause: I had modified the value associated with the BundleIdentifier key in the Info.plist (via General-> Bundle Identifier) of the parent app to match a URL Type (for SSO redirect); however, I failed to update the WatchKit App Info.plist value associated with the WKCompanionAppBundleIdentifier key (see second bold line).

Fix: Modify the WatchKit App Info.plist value for the key WKCompanionAppBundleIdentifier to agree with parent app's bundle ID

Triturable answered 12/10, 2018 at 14:18 Comment(0)
O
1

You may also want to look under Capabilities for your different targets. I ended up having an issue with my App ID

enter image description here

Obcordate answered 18/12, 2017 at 22:42 Comment(0)
W
1

I got this error too. It all started a short time after I let Xcode update my project settings. Specifically on my CocoaPod sub-project. I removed the pods and reinstalled them and that solved my issue. Hope this works for you or others who find this question as well.

Windle answered 5/1, 2018 at 11:1 Comment(0)
A
1

Instead of restarting the simulator you can also just delete the app from the simulator. This error is caused when you have made your app ready for production and then attempt to build it on a phone. There are issues when you are trying to build the same app twice (this is also why you don't get this issue when you run in testing mode).

Armadillo answered 3/5, 2018 at 0:3 Comment(0)
F
1

If you importing a custom framework, make sure custom framework->bundle-id is not same as currentAppProject->bundle-id. If you are not sure then simply change the bundle-id of current project. It works for me : )

Felly answered 19/6, 2018 at 9:58 Comment(0)
O
1

In my case, the message appeared when I was migrating from Cocoapods to Carthage and having the Firebase iOS SDK among my dependencies.

The issue was resolved when I realized that Firebase does NOT need to be among the frameworks that are copied in the carthage copy-frameworks phase.

For more on Firebase and Carthage, see the official documentation.

Offset answered 26/6, 2018 at 16:8 Comment(0)
K
1

I have faced the same problem like this. but nothing worked for me. Then i noticed one problem in my info.Plist file. The Executable file name was different compare to Schema name in Edit Schema. So make sure This both is same, then try to run your project. It should work.

Kiosk answered 9/1, 2019 at 11:12 Comment(0)
C
1

If someone is still facing this problem please check these steps. This usually happens when there is some error in your Info.plist. In my case, there were two Supported interface orientations entry.

Follow these steps and you will surely find the solution to this. Most of them are already mentioned above

  1. Simulator > Device > Erase All Content & Settings
  2. Remove duplicate entry of Supported interface orientation or check your plist file for any error
  3. In your Xcode > Product > Clean Build Folder ( Cmd + Shift + K)
  4. Just try to Build & Run the project

I hope you are able to fix this irritating problem after this.

Please check the reference image attached enter image description here

Capablanca answered 2/4, 2020 at 3:27 Comment(0)
V
0

I had this issue while working with Xcode 9.2. The solution is to simply delete the app and re-install it again.

Vertical answered 19/3, 2018 at 11:17 Comment(4)
Once the app is installed it will not allow me to reinstall - so this doesn't work for me.Topazolite
@Topazolite : Why so?Vertical
To be clear i didn’t down vote. But this didn’t work for me. What ended up working was resetting the device and cleaning the build and the projectTopazolite
This answer is not wrong, one of the solutions of this issue. I also use it.Eldridge
H
0

This happened when I had an empty build number set for the target in Xcode 10.0.

Hemicellulose answered 24/10, 2018 at 21:17 Comment(0)
O
0

In my case i was trying to run a widget. Scheme settings for widget should be: Run -> Info -> Executable: "Ask on launch"

Orpha answered 19/12, 2018 at 7:33 Comment(0)
M
0

Hi Guys just want to let you know that none of the above worked for me.

enter image description here

I was busy working, integrating a dynamic library into my project. I know that the library worked, so I didn't give it a second thought.W hat I did was just to delete the reference to MyLibrary1, recompiled MyLibrary1 and embedded again for a successful build. Hope this helps someone.

Regards Rolf

Magnolia answered 17/1, 2019 at 6:25 Comment(0)
A
0

I delete the files in ~/Library/Logs/CoreSimulator/ but problem still exist. Then I erase all contents and settings and it's ok!

Against answered 15/5, 2019 at 8:2 Comment(2)
what does "erase all contents and settings" mean...?Experienced
@Experienced Simulator -> Hardware -> Erase all content and settings...Against
U
0

When you use letters which is not the alphabet for Display name, this error might occur. For more information take a look at this. Xcode11でCould not hardlink copyってエラーが出る

Uchida answered 19/6, 2020 at 10:1 Comment(0)
A
0

For me moving Xcode to Applications folder resolved the issue. If you did downloaded an Xcode from the web, consider doing so.

Azar answered 6/7, 2020 at 20:55 Comment(0)
C
0

Simply delete your application by your self in simulator and re run again. it worked for me.

Camillecamilo answered 11/8, 2020 at 4:31 Comment(0)
P
0

In my case, my app uses app display name in Vietnamese (contain some special characters). I removed old app installed in simulator, then change my app name with only alphabet characters, and it worked!

Parmer answered 26/8, 2020 at 3:49 Comment(0)
S
0

In my case, the issue was creating a new target with a same bundle ID of an already existing one. After changing it, voila!

Settling answered 30/6, 2021 at 20:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.