This app could not be installed at this time in Xcode Simulator
Try uninstalling the app from the simulator and reinstalling it
Make sure you have a valid CFBundleVersion
in your Info.plist
, otherwise the first install may succeed but update installs will fail.
This often presents as the "failed to hardlink copy" error but clears up after deleting the app and re-installing, or sometimes it works the first time you reboot but fails every attempt after.
If you are already in this state make sure you delete the app (using xcrun simctl uninstall <device name or identifier> <bundle ID>
or by holding down on the icon, then clicking the X just like you would on a physical device).
Common errors include accidentally deleting the value from your Info.plist, a failure in some kind of automated script (eg that auto-increments the number), or defeating Xcode's processing of the Info.plist (which normally does $(BUILD_SETTING_GOES_HERE)
style replacements).
When debugging issues I recommend you always check the basics first! Are you sure your Info.plist is correct? If you've never actually looked at it after it has gone through a build how do you know?
- Right-click the target under Products in Xcode
- Select Show in Finder
- Right-click your app bundle
- Select Show Contents.
- Open Terminal and type
plutil -p
- Drag the
Info.plist
from the finder window and drop it onto Terminal. This will paste the path to the file. - Hit enter. Now look for
CFBundleVersion
. If it isn't a valid semantic or numeric version then you'll need to fix that.
edit: There is a bug in Xcode 11 Beta 1 where an attempt to install will fail, then it keeps failing with the same error even after you fix your Info.plist
. This is due to NSBundle
caching. Restart the affected Simulator and the next install should work.