Error displaying iPhone simulator when reinstalling application from Xcode

I am using Xcode 6 with iOS Simulator version 8.1 (build 550.3).

When I select "Build and Run" in Xcode, everything works well if the application is not already installed in the simulator. However, if so, I get the following error in Xcode:

Cannot start the application in the simulator. An error was detected during operation (Domain = LaunchServicesError, Code = 0)

And the logs for the simulator show the following:

less ~/Library/Logs/CoreSimulator/CoreSimulator.log Nov 6 11:53:47 Yggdrasil.local com.apple.dt.Xcode[4389] <Error>: Error Domain=LaunchServicesError Code=0 "The operation couldn't be completed. (LaunchServicesError error 0.)" UserInfo=0x7fa697742360 {Error=PackagePatchFailed, ErrorDescription=Could not hardlink copy /Volumes/UsersData/Users/kender/Library/Developer/CoreSimulator/Devices/AAD57C40-E208-4964-B63A-46B968B3EB36/data/Containers/Bundle/Application/FEE2DEB4-AEE3-48B7-BE71-5B027259C6FD/Baby Feeding.app to /Volumes/UsersData/Users/kender/Library/Developer/CoreSimulator/Devices/AAD57C40-E208-4964-B63A-46B968B3EB36/data/Library/Caches/com.apple.mobile.installd.staging/temp.P8QJEE/extracted/Payload/Baby Feeding.app with manifest /Volumes/UsersData/Users/kender/Library/Developer/CoreSimulator/Devices/AAD57C40-E208-4964-B63A-46B968B3EB36/data/Library/Caches/com.apple.mobile.installd.staging/temp.P8QJEE/extracted/com.apple.deltainstallcommands.com.owlcoding.babyfeeding} 

( /Volumes/UsersData/Users/kender is my $HOME ).

I tried to remove all the simulators (from the Devices window in Xcode and re-add them - no luck.

I deleted the entire ~ / Library / Developer directory and allowed Xcode to recreate it - the same after that.

So right now I am stuck in Build and Run β†’ Make changes β†’ Remove app β†’ Build and Run flow, what a crap ... Anyone ran into this problem and found a solution, or maybe you guys have some pointers for me. ..

+6
source share
2 answers

I had the same problem and this was due to the localization of Info.plist.

My application is localized in several languages, and each localization has an InfoPlist.strings file with the key CFBundleShortVersionString. I changed the Versions line in the target information, but not in the InfoPlist.strings files.

So, I uninstalled the application in Simulator, updated CFBundleShortVersionString in all localized Info.plist files to match the version on Target, and this solved the problem for me.

+27
source

An error indicates that the installation failed due to a hard binding. I suspect the file system for your $ HOME does not support hard links. Refresh your question to indicate the type of file system / Volume / UsersData.

If you cannot maintain hard links in / Volumes / UsersData, I suggest you create a local directory for your simulator data and create a symbolic link from ~ / Library / Developer / CoreSimulator / Devices.

Also on the side of the note, deleting the entire ~ / Library / Developer library may lead to a malfunction of the simulator service. If you do, make sure Xcode, iOS Simulator, Instruments, etc. Gone, but ALSO make sure the service is also killed by running killall -9 com.apple.CoreSimulator.CoreSimulatorService

+3
source

Source: https://habr.com/ru/post/977824/


All Articles