iOS Simulator could not hardlink copy

Hi


I'm having a problem running an iPhone app on my iOS simulator. Running the app the first time is fine, but then on subsequent runs, I see this message:


Could not hardlink copy /Users/<username>/Library/Developer/CoreSimulator/Devices/062ADB01-35DC-42B5-A876-385D933C5614/data/Containers/Bundle/Application/B480BACD-2D04-4FE5-B5F0-95496CA0B0D2/<appname>.app to /Users/<username>/Library/Developer/CoreSimulator/Devices/062ADB01-35DC-42B5-A876-385D933C5614/data/Library/Caches/com.apple.mobile.installd.staging/temp.K7Pkpc/extracted/Payload/<appname>.app with manifest /Users/<username>/Library/Developer/CoreSimulator/Devices/062ADB01-35DC-42B5-A876-385D933C5614/data/Library/Caches/com.apple.mobile.installd.staging/temp.K7Pkpc/extracted/com.apple.deltainstallcommands.<bundle id>


I've seen references to this issue on web forums which suggest a reset of the simulator content and settings, but have no idea how to solve the underlying problem. A reset of the simulator helps, but is adding hours to my day after rebooting everytime I want to run the app.


This is with Smulator 10.0, Xcode 8.1 and MacOS Sierra.


Help please. 🙂

You might want to file a bug w/a sample project attached that demonstrates the issue.


Good luck.

We have the same problem here with XCode 8.2.1.

Same problem here!! really frustrating!

Have to reset content and settings everytime!!

You probably have a mix of version numbers if you support multiple languages. For each language exists a infoPlist.strings file. Check this entry:


/ (No Commment) */

"CFBundleShortVersionString" = "2.2";


This version number must be identical with every language and your main settings.


At least that solved the issue for me.

Hi,

I have just met this problem,you can change the build number,and clean the project ,then reboot your simulator. Wish it works.

same problem here XCode Version 8.3.2 (8E2002) on macOS 10.12.4 - if I'm lucky I get my Simulator working, but on second try and after clean and restarts of XCode this error is persistent - support 4 languages with localizes strings, but only one plist BundleVersionStringShort 3.1.2 - this is the manually updated version number: active now is 3.1.1 but in dev is 3.1.2... does this have an effect?

This fixed it for me:


SIMULATOR_NAME="iPad Air 2"

# Erase a device's contents and settings

xcrun simctl erase "${SIMULATOR_NAME}"


Thanks to https://encyclopediaofdaniel.com/blog/xcode-6-reset-simulators-from-the-command-line/ for the explanation!


My env:
xcode 8.3.1

iOS 10.3 (14E269)

SIMULATOR_NAME="iPad Air 2"

I've tried to work around this problem for ages. This was it for me! Thanks dbartels!

I had the same issue and found out that in info.plist there were a hardcoded version number instead of variable

look for 'CFBundleShortVersionString' and change its value to '$(MARKETING_VERSION)'

then you have to go to your Project Identity and you will notice the version field is empty, just write yours there and run the app.

The issue in our case was using a Swedish "Å" character in the Product Name. Had to use a user defined setting for the display name instead, then uninstall the app from the simulator and probably also a clean build folder.
iOS Simulator could not hardlink copy
 
 
Q