Why Xcode shows "This app could not be installed at this time." pop-up? - ios

When I run the project and add the app in simulator for the first time, everything is okay. But when I run it again, Xcode prompts this message as a pop-up window at the end of compilation:
This app could not be installed at this time.
I already checked the relevant question, and tried all the advised ways to solve this issue; checking mentioned logs, cleaning project, restarting simulator, changing it, erasing all content and settings in it. Nothing works. I must erase the app and recompile it every time to open the app. Did you get the same message before? Is there any way to detect problem and resolve it? Btw, I use Xcode 9.2 at High Sierra.

This error pop-up may come up for different reasons. There is no specific reason to see it for now. In my case, a JSON file that I added to Bundle in order to provide mock data triggered this issue. This file was containing a Turkish letter in one of the keys. After I fix it, the pop-up is gone. Interestingly, earlier simulators (<=9.1) work properly if JSON file contains Turkish letter but 9.2 simulators cannot tolerate it.

Worked for me when I rebuild the project after deleting the derived data folder.

I think I may have found a solution. This all started a short time after I let Xcode update my project settings. Specifically on my CocoaPod-Subproject. I removed the pods and reinstalled them and now I am no longer getting the pop-up.

Related

Simulator fails with (LaunchServicesError error 0.) [duplicate]

This question already has answers here:
Unable to run app in Simulator : An error was encountered while running (Domain = LaunchServicesError, Code = 0)
(19 answers)
Closed 5 years ago.
I received an error (Domain = LaunchServicesError, Code = 0) when trying to launch my app in the iOS Simulator with Xcode 6. I looked for solution in google, but I didn't find anything practical.
What does this error mean?
This error indicates that there was a problem with installation. Unfortunately, Xcode does not actually print the contents of the error message that would give you more insight, but you can look at ~/Library/Logs/CoreSimulator/CoreSimulator.log to see the rest of the error details. There will also be more information about the problem in the simulated device's system log (~/Library/Logs/CoreSimulator/[Device UDID]/system.log); look for messages from installd around the time of the error).
Common causes for this include bundles missing an Info.plist, missing keys within your bundle's Info.plist, or values for some keys in the Info.plist not being allowed.
If your app's Info.plist does not contain a valid CFBundleVersion key/value pair, it is possible that your app may install correctly the first time but fail to update. Many users seem to work around this by doing a "Reset Contents & Settings" after each install, but it would be better to fix the root cause by setting an appropriate CFBundleVersion in the Info.plist. I believe iOS 8.2 now correctly returns an error on the first install in this case rather than just on updates, so hopefully this problem will be more obvious now.
Users with home directories on file systems that do not support hard links (eg: network home directories via AFP, SMB, or some NFS servers) may also run into problems related to hard linking. If this is the case, I suggest you create a path on your local HFS+ filesystem for simulator development (eg: /var/simulator/[user]) and create a symlink to that path from ~/Library/Developer/CoreSimulator. This particular issue was fixed in one of the iOS 8.2 betas.
In another case, the Build&Run would always succeed on the first try, but subsequent attempts would sometimes fail due to a changed Info.plist (eg: because someone's build system settings result in CFBundleVersion being different on each iteration). You can usually recover by either deleting the installed app (using a long-press from the home screen or xcrun simctl uninstall [Device UDID] [app identifier]) or erasing the device back to a default state. To erase the device, execute xcrun simctl erase [Device UDID] from terminal or choose Erase Contents & Settings from the iOS Simulator menu. This particular issue was fixed in one of the iOS 8.2 betas.
A newer instance of this issue is occurring for Xcode 6.2 users. If you have a WatchKit App Extension bundled in your app, it will fail to install to versions of the iOS Simulator runtime older than iOS 8.2. As a workaround, you will need to manually disable the app extension from installing when you want to test with iOS 8.1 and earlier runtimes.
If you need more specific help, please provide the entirety of the error message from CoreSimulator.log and any messages from installd and CoreSimulatorBridge that appear around the same time in ~/Library/Logs/CoreSimulator/[Device UDID]/system.log as that will reveal the underlying problem.
Does your project include a widget or extension? If so, the problem could be the bundle identifier of your widget/extension. It should be the same as the main target, appended with a period and an extra string. So for example:
Main target: com.mycompany.myapp
Widget should be: com.mycompany.myapp.widget
I fixed it by resetting the simulator:
iOS Simulator > Reset Contents and Settings...
Since everyone writes what they went through and how they fixed their exact problem, that might be unhelpful.
The problem is that there are different causes for the same error message and the right way of solving it is to open up ~/Library/Logs/CoreSimulator/CoreSimulator.log and look in there for the last message. This message gives you a good clue and sets you on the right path of solving your problem (sometimes it's bundle IDs, sometimes it's a missing or an extra attribute in the Info.plist, but you always get a good, descriptive clue).
This is how you narrow down the problem and eventually get to fix it.
Good luck and tough nerves with Xcode .)
Z.
For me I just cleaned the project and it worked -> Product -> Clean
TLDR: Clear your Project Build Folder - and you will be free of this pain.
( plus I logged this as a bug with Apple as they need to find a way to fix this in Xcode )
None of these solutions worked for me - I banged my head against several walls.
I looked at the CoreSimulator log and I realised that it was trying to build a library that I had deleted.
I couldn't find references to it anywhere.
Then I saw via another SO Question which unfortunately I can't find to reference, if you:
Hold down your option key then Product-> Clean option becomes Clean
Build Folder
Press that and enjoy having your error vanish
"Reset Content and Settings" from iOS Simutalor menu options and launching simulator after Quitting solved my issue.
In XCode 6
An error was encountered while running (Domain = LaunchServicesError,
Code = 0)
I had this error after making some major code changes to accommodate the iPhone 6 Screens. in Xcode 6 (iOS8)
I followed the options above and found that the only way to really get this fixed was by doing the following:
Deleted the derived data [go to Window >> Organizer >> (Find your App) Click on Delete next to the Derived Data]
Product >> Clean
Reset Contents and Settings in Simulator
Changed the Bundle Version to 1.4.1 from 1.4 in pList
Thank you for all the previous answers that got me to this stage. It worked a charm!
In my case, the error was caused because i didn't set the build id.
Setting this, launches the emulator without problem.
One other thing to try, that worked for me, after resetting the simulator and doing a clean build did not help, is clearing out the derived data. To do this: go to Organizer click on project click on delete derived data button. I had this happen after working on an extension for a while and went back to the regular branch. Hope this helps.
This is what caused the problem for me: the build number for the main app and the extension were different (I had incremented the main app build number to 1.0.1.03, but left the extension at 1.0.1.02).
Making them match fixed the problem for me.
Open the Console app and look there. In my case it told me exactly what to do. I saw:
ErrorDescription=WatchKit 2 app extension's NSExtension.NSExtensionAttributes.WKAppBundleIdentifier value does not match WatchKit app's bundle ID (found "com.myCompany.MyApp.MyApp.watchkitapp"; expected "com.myCompany.MyApp.watchkitapp").
So, I went to each plist and checked any items that related to a BundleID. Then Clean, relaunch, etc.
My case was about framework compilation. I have enabled the 'copy only when installing' option from Target- Build Phases- Embedded Frameworks-
I have an app that is set up to use different bundle IDs based on the build configuration. When creating my Apple Watch extension, Xcode generated everything using my Release ID, so I had to go through and change it all manually for debugging. Here's all the places I had to change it:
WatchKit Extension's Build Settings -> Packaging -> Product Bundle Identifier
WatchKit Extension's Info.plist -> NSExtension -> NSExtensionAttributes -> WKAppBundleIdentifier (this needs to use the same prefix as your companion app)
WatchKit App's Info.plist -> WKCompanionAppBundleIdentifier
The last one took me a while since the WatchKit App's Info doesn't show up as a tab when viewing the target settings, I had to go direct to the Info.plist file itself.
Try putting some number into [TARGETS]-[General]-[Identity]-[Version(or Build)], if they are empty.
It worked for me.
I hope it will help you.
I also have this error. In my case the log ~/Library/Logs/CoreSimulator/CoreSimulator.log was something like that :
Could not hardlink copy /Users/myUser/Library/Developer/CoreSimulator/Devices/60E569E7-6750-428A-A401-841BB081xxxx/data/Containers/Bundle/Application/70F24DDC-7954-46BF-B799-F807FD98yyyy/myApp.app to /Users/myUser/Library/Developer/CoreSimulator/Devices/60E569E7-6750-428A-A401-841BB081xxxx/data/Library/Caches/com.apple.mobile.installd.staging/temp.kOrJ9G/extracted/Payload/myApp.app with manifest /Users/myUser/Library/Developer/CoreSimulator/Devices/60E569E7-6750-428A-A401-841BB081xxxx/data/Library/Caches/com.apple.mobile.installd.staging/temp.kOrJ9G/extracted/com.apple.deltainstallcommands.com.mycompagny.myapp
thanks to this answer In look at my app info.plist. the key CFBundleVersion was missing so I add it and now everything is working !
None of the above worked for me, but this did:
I simply deleted IceCream.xcworkspace/xcuserdata/xcuserdatad and then reset the simulator and ran the app again. (Reseting the simulator alone, did not work for me.)
"Reset Content and Settings" from iOS Simutalor menu options and launching simulator after Quitting solved my issue.
The great explanation by Jeremy at least set me in the right direction, but despite having all the bundle identifiers and versions set correctly, the error still persisted. I then checked the Apple documentation which shows that the WatchKit extension (in its Copy Bundle Resources phase) copies the WatchKit app. This WatchKit app was named exactly the same as my iOS app, causing Xcode to confuse the two and read out the wrong plist, thinking the bundle identifier was incorrect. Renaming the Product of the WatchKit app to something distinct finally solved it for me.
If you've changed your bundle ID, make sure you do a clean build before trying to build it again! See how here: How to Empty Caches and Clean All Targets Xcode 4
So it's definitelly .plist problem. In my case it was empty NSExtensionMainStoryboard, removing this property fixed the problem
I had this error whilst trying to build Apple's Lister Xcode Project and run it on the simulator.
The essentials which fixed it for me were:
1) BundleID for the iOS App and the iOS Extension had to be different
2) I provide iCloud and App Groups for both targets
3) I used Xcode's "Fix Issue" to fix the issues
After that I could build and run the app without warnings or errors.
The clue from the log file was "... LegacyErrorString=DuplicateIdentifier, FunctionName=-[MIInstallableBundle performPreflightWithError:], SourceFileLine=450, NSLocalizedDescription=The parent bundle has the same identifier (com.ACMECompany.Lister) as sub-bundle at /Users/stephen/Library/Developer/CoreSimulator/Devices/5329928B-946B-40A4-B666-EFD11B96D11F/data/Library/Caches/com.apple.mobile.installd.staging/temp.HQ5d9X/extracted/Lister.app/PlugIns/Lister.appex"
Had a wrong app version set in InfoPlist.strings localization file. Urgh!
An hour gone!
Delete your simulator and regenerate one.
It works for me.
I removed the key in watch app's .plist file that shouldn't have been there. And the problem disappeared.
This worked for me:
In project settings -> General tab -> Identity section I changed the Version number from something like 2.0.2 (three digits) to 2.0 (two digits) then I deleted the app in the simulator and run the project again. No more error after that.
One other possible solution to add to all of the others that will no doubt stay above mine ;)
I deleted & later reinstated a Today Extension target retaining the source files, but after trying every solution under the sun, I realised it didn't have any sources or resources in its target! You might encounter this as well if your detailed launch services error can't find your compiled app extension file.
So, long story short, make sure your target has something included to compile or bundle in there. You can check your target memberships by selecting the relevant file(s) on your project navigator (on the left) and setting your checkmark(s) as appropriate in the file inspector (that's the first tab on the right).
I had the following in my log...
<Error>: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=ExecutableTwiddleFailed...
This was due to there being no source files added in the extension project.
This error was showing up on my system when there was no hard disk space available. I freed up some space on my system for it to work.
My Problem was that the wrapper extension for the target project was unset.
To fix I had to go to target project -> build settings -> Packaging -> Wrapper Extension.
Set this to "app" (No quotes)
This fixed the problem for me

App installation failed: Could not write to the device

In Xcode 6.3, I got this error when trying to run an iOS project written in Swift on a real device.
App installation failed
could not write to the device.
I tried to clean the project and run again, but the same error occurs.
How can I fix this error?
Deleting the app on the device and running the project again works for me.
I did a Clean and installed my app successfully.
Product->Clean(Shift-Cmd-K)
I turned off the device and turned it on again after which I did not get such error.
OK, few things you should consider that could guide us to the problem, please check and post the answers:
is your project using capabilities? are they set correctly (should be all green)
did you try with a different project (something really simple)?
are you able to install apps from the App Store?
did you check the amount of free space left in the device?
if not, another suggestion will be using exception breakpoint, there is someone that posted an explanation how to setup it, do it and post the logs
App installation failed
I hope it helps you
Got this problem twice in one week on complete different devices.
One device had no more storage left, after deleting some apps the project installed perfectly.
The other device was fixed after rebooting the device
If you are using a free developer account you may need to uninstall some other apps you have signed.
For me it was the provisioning profile - I used distribution instead of development
My issue was an embedded framework.
Go to "Build Phases" -> "Embed Frameworks" -> Check "Copy only when installing", and it got rid of the issue for me.
For me the following did not work on iOS 11 beta 10, XCode 9 beta 6:
Restart the device
Deleting the app from the device
No symlinks were in the project
There was plenty of storage available
Deleted Derived Data and voilá, it worked again
in my project this problem happened because there was a folder with symbolic link. I removed that folder and it worked properly.
This error has many potential root causes, as can be seen by the large variety of suggested answers. The best approach to troubleshooting app installation issues like this one is usually to inspect the console of the iOS device itself, as that'll often provide much more specific error messages. In Xcode open the 'Devices and Simulators' window and take a peek at the logs of the device where your app is being installed.
In my case, the "Could not write to the device" error was being caused by this:
Feb 27 10:54:58 iPhone-7-110 installd(MobileSystemServices)[46] : 0x16f92f000 -[MIBundle _validateWithError:]: 38: Failed to load Info.plist from bundle at path /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.ebmR6U/extracted/SampleApp.app/Frameworks/SomeFramework.framework
Which clearly hints at what's actually going on. I had forgotten to set an Info.plist file for my dynamic framework target (used by the app).
I had a symlink in my project to a file outside of the project. When I deleted this symlink the install worked fine.
I was having the same error, i just deleted the project and fixed!
Go to Window -> Project and right click, and remove from projects!
In the case of your device have an app with the same bundle identifier, Xcode will throw this error.
Try to delete potential app with the same bundle identifier.
Check your provision profile, maybe you are using the app store provision profile like me. I had to change the app store provision profile to development, now it's working.
Tried all of the above answers: Deleting the app, clearing storage space, cleaning the project...
What finally worked was bumping the build number in info.plist (General > Build)
For anyone still facing this Issue:
There are so many reasons and this is one of them as it happened to me.
I've faced the same problem and I was connected wirelessly and If you are trying to install the application in wireless connecting mode (connected through same network), this might probably because of poor internet connection. Check your internet connection and try again, it works fine...
Get rid of embedded libraries, dont' just throw it in there make sure it is embedded indeed.
If you use your iPhone for debug, maybe, because your iPhone's storage space is less than your debug App.
Clean your iPhone --- Real machine
Clean your Mac --- Simulator
This looks like another time waster courtesy of Apple's amazingly high class development team. On iOS11 Xcode9 (pick your beta, any one works) this will happen randomly. Appears to be more frequent if you dare to switch apps while compiling. Just build again and stare at xcode - it'll work the second time without fail in my experience.
Apparently this message can also appear if the system clock of device where the app is being installed is too far away from the current time.
I was doing some tests with date formatters by changing my iPhone's system clock and eventually forgot to reset it to the current time. Afterwards it always displayed the same message ("could not write to the device.") whenever I attempted to run the app. Simply resetting the clock in Settings fixed the issue.
Nothing helped me. I followed the below steps,
Clean derived data folder
Quit Xcode and disconnect device
Restart Macbook
Restart Device
Open Xcode
Clean and run the project
Finally I got it working!!
I am facing same issue then solved out follow this step and now its working.
Deleting the app from the device
Try to install another application
Remove derived data in X-code.
Restart X-Code then clean and build the project then run.
It's still not working then
Remove un-used application
Restart the device and check the Available and capacity in settings
Again app run in device
I hope its worked, enjoy it.
My problem was I had initially installed the app using a different set of developer credentials on the device. Deleting the app from the device fixed it.
Maybe it can be due to the following error App installation failed. No code signature found. In my case after a project clean the description of the error switched to "No code signature found".
In my case I created two frameworks but they had the same bundle identifier.
This caused the installation to fail, so double check the frameworks bundle identifiers and make sure that each of them have a unique bundle identifier.
Environment: Xcode 10
sometime this error occurs due to wrong certificate.Please make sure your certificate.
Also this the error shown if your machine running Xcode is low on space.
Once I had to load an App Container for debugging purposes into an iPad, said operation failed because the container was too big (18 GB) for this device (16 GB minus the OS), so that I desisted the task and completly forgot about it, leaving the failed installation in the device. Later, when trying to install a different application this error appeared, once I got rid of the failed app installation, everything got back to normal.
Basically, your Ipad might be low in storage.
One reason this can happen is if your app bundle contains broken symlinks.

An error was encountered while running (Domain = LaunchServicesError, Code = 0) [duplicate]

This question already has answers here:
Unable to run app in Simulator : An error was encountered while running (Domain = LaunchServicesError, Code = 0)
(19 answers)
Closed 5 years ago.
I received an error (Domain = LaunchServicesError, Code = 0) when trying to launch my app in the iOS Simulator with Xcode 6. I looked for solution in google, but I didn't find anything practical.
What does this error mean?
This error indicates that there was a problem with installation. Unfortunately, Xcode does not actually print the contents of the error message that would give you more insight, but you can look at ~/Library/Logs/CoreSimulator/CoreSimulator.log to see the rest of the error details. There will also be more information about the problem in the simulated device's system log (~/Library/Logs/CoreSimulator/[Device UDID]/system.log); look for messages from installd around the time of the error).
Common causes for this include bundles missing an Info.plist, missing keys within your bundle's Info.plist, or values for some keys in the Info.plist not being allowed.
If your app's Info.plist does not contain a valid CFBundleVersion key/value pair, it is possible that your app may install correctly the first time but fail to update. Many users seem to work around this by doing a "Reset Contents & Settings" after each install, but it would be better to fix the root cause by setting an appropriate CFBundleVersion in the Info.plist. I believe iOS 8.2 now correctly returns an error on the first install in this case rather than just on updates, so hopefully this problem will be more obvious now.
Users with home directories on file systems that do not support hard links (eg: network home directories via AFP, SMB, or some NFS servers) may also run into problems related to hard linking. If this is the case, I suggest you create a path on your local HFS+ filesystem for simulator development (eg: /var/simulator/[user]) and create a symlink to that path from ~/Library/Developer/CoreSimulator. This particular issue was fixed in one of the iOS 8.2 betas.
In another case, the Build&Run would always succeed on the first try, but subsequent attempts would sometimes fail due to a changed Info.plist (eg: because someone's build system settings result in CFBundleVersion being different on each iteration). You can usually recover by either deleting the installed app (using a long-press from the home screen or xcrun simctl uninstall [Device UDID] [app identifier]) or erasing the device back to a default state. To erase the device, execute xcrun simctl erase [Device UDID] from terminal or choose Erase Contents & Settings from the iOS Simulator menu. This particular issue was fixed in one of the iOS 8.2 betas.
A newer instance of this issue is occurring for Xcode 6.2 users. If you have a WatchKit App Extension bundled in your app, it will fail to install to versions of the iOS Simulator runtime older than iOS 8.2. As a workaround, you will need to manually disable the app extension from installing when you want to test with iOS 8.1 and earlier runtimes.
If you need more specific help, please provide the entirety of the error message from CoreSimulator.log and any messages from installd and CoreSimulatorBridge that appear around the same time in ~/Library/Logs/CoreSimulator/[Device UDID]/system.log as that will reveal the underlying problem.
Does your project include a widget or extension? If so, the problem could be the bundle identifier of your widget/extension. It should be the same as the main target, appended with a period and an extra string. So for example:
Main target: com.mycompany.myapp
Widget should be: com.mycompany.myapp.widget
I fixed it by resetting the simulator:
iOS Simulator > Reset Contents and Settings...
Since everyone writes what they went through and how they fixed their exact problem, that might be unhelpful.
The problem is that there are different causes for the same error message and the right way of solving it is to open up ~/Library/Logs/CoreSimulator/CoreSimulator.log and look in there for the last message. This message gives you a good clue and sets you on the right path of solving your problem (sometimes it's bundle IDs, sometimes it's a missing or an extra attribute in the Info.plist, but you always get a good, descriptive clue).
This is how you narrow down the problem and eventually get to fix it.
Good luck and tough nerves with Xcode .)
Z.
For me I just cleaned the project and it worked -> Product -> Clean
TLDR: Clear your Project Build Folder - and you will be free of this pain.
( plus I logged this as a bug with Apple as they need to find a way to fix this in Xcode )
None of these solutions worked for me - I banged my head against several walls.
I looked at the CoreSimulator log and I realised that it was trying to build a library that I had deleted.
I couldn't find references to it anywhere.
Then I saw via another SO Question which unfortunately I can't find to reference, if you:
Hold down your option key then Product-> Clean option becomes Clean
Build Folder
Press that and enjoy having your error vanish
"Reset Content and Settings" from iOS Simutalor menu options and launching simulator after Quitting solved my issue.
In XCode 6
An error was encountered while running (Domain = LaunchServicesError,
Code = 0)
I had this error after making some major code changes to accommodate the iPhone 6 Screens. in Xcode 6 (iOS8)
I followed the options above and found that the only way to really get this fixed was by doing the following:
Deleted the derived data [go to Window >> Organizer >> (Find your App) Click on Delete next to the Derived Data]
Product >> Clean
Reset Contents and Settings in Simulator
Changed the Bundle Version to 1.4.1 from 1.4 in pList
Thank you for all the previous answers that got me to this stage. It worked a charm!
In my case, the error was caused because i didn't set the build id.
Setting this, launches the emulator without problem.
One other thing to try, that worked for me, after resetting the simulator and doing a clean build did not help, is clearing out the derived data. To do this: go to Organizer click on project click on delete derived data button. I had this happen after working on an extension for a while and went back to the regular branch. Hope this helps.
This is what caused the problem for me: the build number for the main app and the extension were different (I had incremented the main app build number to 1.0.1.03, but left the extension at 1.0.1.02).
Making them match fixed the problem for me.
Open the Console app and look there. In my case it told me exactly what to do. I saw:
ErrorDescription=WatchKit 2 app extension's NSExtension.NSExtensionAttributes.WKAppBundleIdentifier value does not match WatchKit app's bundle ID (found "com.myCompany.MyApp.MyApp.watchkitapp"; expected "com.myCompany.MyApp.watchkitapp").
So, I went to each plist and checked any items that related to a BundleID. Then Clean, relaunch, etc.
My case was about framework compilation. I have enabled the 'copy only when installing' option from Target- Build Phases- Embedded Frameworks-
I have an app that is set up to use different bundle IDs based on the build configuration. When creating my Apple Watch extension, Xcode generated everything using my Release ID, so I had to go through and change it all manually for debugging. Here's all the places I had to change it:
WatchKit Extension's Build Settings -> Packaging -> Product Bundle Identifier
WatchKit Extension's Info.plist -> NSExtension -> NSExtensionAttributes -> WKAppBundleIdentifier (this needs to use the same prefix as your companion app)
WatchKit App's Info.plist -> WKCompanionAppBundleIdentifier
The last one took me a while since the WatchKit App's Info doesn't show up as a tab when viewing the target settings, I had to go direct to the Info.plist file itself.
Try putting some number into [TARGETS]-[General]-[Identity]-[Version(or Build)], if they are empty.
It worked for me.
I hope it will help you.
I also have this error. In my case the log ~/Library/Logs/CoreSimulator/CoreSimulator.log was something like that :
Could not hardlink copy /Users/myUser/Library/Developer/CoreSimulator/Devices/60E569E7-6750-428A-A401-841BB081xxxx/data/Containers/Bundle/Application/70F24DDC-7954-46BF-B799-F807FD98yyyy/myApp.app to /Users/myUser/Library/Developer/CoreSimulator/Devices/60E569E7-6750-428A-A401-841BB081xxxx/data/Library/Caches/com.apple.mobile.installd.staging/temp.kOrJ9G/extracted/Payload/myApp.app with manifest /Users/myUser/Library/Developer/CoreSimulator/Devices/60E569E7-6750-428A-A401-841BB081xxxx/data/Library/Caches/com.apple.mobile.installd.staging/temp.kOrJ9G/extracted/com.apple.deltainstallcommands.com.mycompagny.myapp
thanks to this answer In look at my app info.plist. the key CFBundleVersion was missing so I add it and now everything is working !
None of the above worked for me, but this did:
I simply deleted IceCream.xcworkspace/xcuserdata/xcuserdatad and then reset the simulator and ran the app again. (Reseting the simulator alone, did not work for me.)
"Reset Content and Settings" from iOS Simutalor menu options and launching simulator after Quitting solved my issue.
The great explanation by Jeremy at least set me in the right direction, but despite having all the bundle identifiers and versions set correctly, the error still persisted. I then checked the Apple documentation which shows that the WatchKit extension (in its Copy Bundle Resources phase) copies the WatchKit app. This WatchKit app was named exactly the same as my iOS app, causing Xcode to confuse the two and read out the wrong plist, thinking the bundle identifier was incorrect. Renaming the Product of the WatchKit app to something distinct finally solved it for me.
If you've changed your bundle ID, make sure you do a clean build before trying to build it again! See how here: How to Empty Caches and Clean All Targets Xcode 4
So it's definitelly .plist problem. In my case it was empty NSExtensionMainStoryboard, removing this property fixed the problem
I had this error whilst trying to build Apple's Lister Xcode Project and run it on the simulator.
The essentials which fixed it for me were:
1) BundleID for the iOS App and the iOS Extension had to be different
2) I provide iCloud and App Groups for both targets
3) I used Xcode's "Fix Issue" to fix the issues
After that I could build and run the app without warnings or errors.
The clue from the log file was "... LegacyErrorString=DuplicateIdentifier, FunctionName=-[MIInstallableBundle performPreflightWithError:], SourceFileLine=450, NSLocalizedDescription=The parent bundle has the same identifier (com.ACMECompany.Lister) as sub-bundle at /Users/stephen/Library/Developer/CoreSimulator/Devices/5329928B-946B-40A4-B666-EFD11B96D11F/data/Library/Caches/com.apple.mobile.installd.staging/temp.HQ5d9X/extracted/Lister.app/PlugIns/Lister.appex"
Had a wrong app version set in InfoPlist.strings localization file. Urgh!
An hour gone!
Delete your simulator and regenerate one.
It works for me.
I removed the key in watch app's .plist file that shouldn't have been there. And the problem disappeared.
This worked for me:
In project settings -> General tab -> Identity section I changed the Version number from something like 2.0.2 (three digits) to 2.0 (two digits) then I deleted the app in the simulator and run the project again. No more error after that.
One other possible solution to add to all of the others that will no doubt stay above mine ;)
I deleted & later reinstated a Today Extension target retaining the source files, but after trying every solution under the sun, I realised it didn't have any sources or resources in its target! You might encounter this as well if your detailed launch services error can't find your compiled app extension file.
So, long story short, make sure your target has something included to compile or bundle in there. You can check your target memberships by selecting the relevant file(s) on your project navigator (on the left) and setting your checkmark(s) as appropriate in the file inspector (that's the first tab on the right).
I had the following in my log...
<Error>: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=ExecutableTwiddleFailed...
This was due to there being no source files added in the extension project.
This error was showing up on my system when there was no hard disk space available. I freed up some space on my system for it to work.
My Problem was that the wrapper extension for the target project was unset.
To fix I had to go to target project -> build settings -> Packaging -> Wrapper Extension.
Set this to "app" (No quotes)
This fixed the problem for me

Storyboard won't update in simulator

I have a working app in Xcode, however when I try to build and run it the simulator displays an older version of the storyboard I was working on. I had changed some of the design on the storyboard but this does not reflect in the simulator, nothing is updated.
Does anyone have any ideas?
Delete the App on the simulator.
Clean
List item
Build & Run
Use NSLog(#"") in your controller to check code execution.
I just spent at least 6 hours on this. I have a solution, but I also submitted a technical support ticket to apple to try to get more info on the cause and proper solution.
Simply remove the references to your storyboard files and add them back in the same file group.
This seems to include the storyboard files back into the app bundle generated during build(which can be seen in the
DerivedData/APPNAME/Build/Products/Debug-iphonesimultator/APPNAME.app
From here I can see my changes reflected from the storyboards as expected.
PS - Are you using localization at all? I was.
I lost 2 hours to this.
Solution was braindead simple: delete app, turn OFF the iPhone 5S (iOS 7.1.1), and turn it bavk on.
When you turn on localization,
xcode moves storyboard file in localization folder (ex. Base.lproj/name.storyboard). When you build and run project on simulator, xcode copy name.storyboard into "derivedData"/Base.lproj/name.storyboard, but previous, created before localization "derivedData"/name.storyboard still exists. In this case simulator uses the file which can be found easier, i.e simulator uses old file "derivedData"/name.storyboard to operate.
Solution: Just rename the storyboard file, in navigator and in targets/general.
This error happened to me for the first time when I had multiple copies of a project on my computer. For whatever reason, the fact that there were multiple copies were making it look as if the storyboard had not been updated between copies and in some cases the code was not updated. I thought I had forgotten to throw the right copy on my flash drive before going home, but it turned out it's an XCode error.
Delete any multiple copies using the same name, restart XCode and open your most recent copy. Extremely bizarre, but I will probably use BitBucket or GitHub from now on instead of throwing it on a flash drive.
Deleting
~/Library/Developer/Xcode/derivedData/
worked for me!
I just have the same problem after localizationMy solution is clicking Product, Clean build folder. Then it will be fine
The storyboard on the simulator was what it should have been. The storyboard on the device would not update. I had to delete the application from the iPhone and then re-run it on the device in order to get the Storyboard to update on the device. Fortunately for me it was only test data, but I was using Auto-Layout on one view and went back to manual. I think that's what caused the issue for me.
I find that removing and adding storyboard file back doesn't work in my case, also it has side effects like it will automatically add a main nib entry into App's plist file (which subsequently makes the App fails to launch in iPhone simulator).
I don't want to try to delete the application from the simulator since I have many files under the Document directory of the App.
At last I find another way that works well: simply delete the "/Users/$username/Library/Application Support/iPhone Simulator/7.1/Applications/$app/$yourapp.app" file. The files under Documents directory are untouched.
(I have localized my storyboard as well.)
I found this same thing happened with Xcode 6.1.1 if I happened to have copied a project; the new project run in the simulator was actually still reflecting the old, original project.
In my case the problem was with how the default area was set up for derived data (essentially the location where the binary files go for a build). Mine was set to legacy and the simulator was using the wrong project, even after a clean. The solution was to go to Preferences->Locations, press Advanced, and change the location from Legacy to Unique.
I get this too when using localized storyboards - Run in Xcode just refuses to install the latest version of the compiled storyboard. I think it is something to do with the way Run copies changed resources across to the device - it does it differently than other forms of on device app installation.
The quickest way to get past this without deleting the app and losing any data is to:
Generate an Archive build in Xcode
Export this for Adhoc deployment
Double-click on the generated IPA to add it to iTunes
From the device page in iTunes force an update to that app
In order for iTunes to see that you have a new version your app build number will need to be incremented (if you don't do that already), before generating the archive.
I find this method means you don't have to delete an app off the device, you're just forcing it to install the entire install package rather than a diff which is what I think Run is doing.
I'm not sure what causes this, if it is a localized resources bug or what, but this is still a problem in Xcode 7 for me.

Xcode 4.4 No such file found launching executable

Before anyone just assumes what I am saying here, please read what I have to say.
I have read the hundreds of posts on this topic and have tried pretty much all the suggested resolutions, in no particular order:
Quitting Xcode
Deleting the derived data folder
Cleaning the project
Hard resetting iPhone
Resetting Mac
Tried a second iPhone
Different USB port
All these in 'special' order
Checked code signing attributes
"Validate Settings" returns no problems
Validation returns no problems
I am stumped when it comes to this. The only thing I can think of is actually resetting my phone, but don't see how this could help when it doesn't work on the second phone either.
Are there any other suggestions, tips, ideas on what could be causing this rather annoying bug?
UPDATE: The exact error:
Error launching remote program: No such file or directory (/Users/Username/Library/Developer/Xcode/DerivedData/ProjectName-dnfacjtdklqktcazrpfyupofdryp/Build/Products/Debug-iphoneos/ProjectName.app/ProjectName).
To get the error, I do any combination of the listed steps above, then click Run on "My Device" (an iPhone 4). Application never installs to the phone and Xcode reports the application has finished running then shows the above error.
My problem was cause by me accidently changing the "Deployment Target" (ios version) to a version higher than what was on the phone I tried to run the code on.
Change the deployment target to below or equal to the ios software version on your phone.
(this answer wasn't on your list) :)

Resources