Xcode 6 process launch failed: timed out trying to launch app - ios

I can't debug my app because when I run it, Xcode gives me the error:
Process launch failed: timed out trying to launch app
In the device I see a black screen and after the error message the app starts.
How can I fix this?
I tried to change the code signing identity and the provisioning profile, and to refresh the provisioning profiles in the Xcode > Preferences > Accounts > Details tab.
I'm using Xcode Version 6.0.1 (6A317) with an iPad mini, running iOS 8.0 and a MacBook with OSX 10.9.4.
After this, if the iPad goes into sleep mode (the screen turns off) I can't wake it anymore; I have to do a soft reset.

You are using distribution provisioning profile rather than development profile. check this link

How to Fix:
I fix it with:
clean project (Product > Clean)
hard reset device (power button + home button)
delete app from device
close xcode
CLOSE ITUNES (itunes must be closed)
re-open Xcode and run!
I think that iTunes was the problem.
EDIT: 2017/02: Solution still Woks (Thanks to #SalGad for information).

I am using Xcode 6.2, running on iPhone 4 with iOS 7.1.2, the problems happen to me as well.
It turned out that the Project and Targets' Code Signing settings are different from each other! And that's what is causing the issue.
To solve the issue, you must make sure that their Code Signing settings is the same.

One more thing that may be a reason to launch timeout arising is that you have a lot of Provision Profiles on your device. I have about 100 of them, downloaded automatically by XCode from our team dev portal. So if your team have tons of apps and Provision Profiles, you better unlink your XCode from your Apple ID, to prevent automatic downloading for unwanted PPs. It significantly decreases app launching time.
To delete unwanted PPs from your device you have to go XCode - Window - Devices, select your device and click "Show provision profiles..." on the bottom context menu. Then you have to manually remove the profiles. Tip: use key sequences "down arrow" - "backspace", to ease the hand routine.

I had this but nothing previously posted seemed to work. This is what I did to fix the issue in Xcode 6.3.2:
Go to Product->Scheme->Edit Scheme...
Select the Run Scheme
Select the Info tab
Make sure the settings are as follows:
Build Configuration is set to "Debug"
Debug Executable is checked
Launch Automatically is checked

In my case I was using the development profile, but somehow, in Build Settings > Code Signing, the Provisioning Profile for Debug was empty.
But before setting it to "iOS Team Provisioning Profile", I had to reset my account since it said " is Not on Any Development teams"
- Xcode > Preferences > Accounts
- Remove my account (click "-")
- Add the account again
That fixed the problem

Note that if the app still manages to start on the device after Xcode displays this error, you can attach to the running process with Debug->Attach to Process.

This warning is shown when you try to run and debug your code directly in device but you are using distribution profile in your Build Settings.
To directly run the code in device and debug, you need to use development profile in your Build Settings of Xcode.
After setting the development profile, just reboot your device clean your Xcode project and run again.
I hope this helps !!

An app should return from his initialisation procedure in less then 10 seconds, or it will be killed by the OS. This is probably because you are doing too many things in the startup phase.
Try to refactor your code to do it diffrently, by doing lazy initialisation, and only initialize what is really important before showing the first view.
It's hard to give better advice before knowing more about the app itself

I have faced this issue with Xcode 6.2 and Iphone 5s with iOS version 8.3.
I get this message when I deploy the application to the device for the first time.
The work around I found was that with out unintalling the application from the device,redeploy the application from Xcode.It should run perfectly this time.
I observed this only on Xcode 6.2 not on Xcode 6.3 so this might be an Xcode to iOS version compatibility issue.

Big and weird tip for this problem... this was happening to me and none of the advice helped anywhere on the web, but then i noticed if i deleted everything out of the main ViewDidLoad method it would work. I realized there was one line of code that was messing it up. It was a line that was referencing to an array of strings that was way to big. I had something like this NSString *mystring[100][1000][100]; i accidentally added some zeros and for whatever reason this problem produced the same error message that the incorrect signing gives you. So don't let your arrays or matrixes get too out of hand!

Method #1:
Lock your phone, press XCode start, wait till XCode says "unlock your device to launch", then unlock your phone, it will be launched successfully, works every time.
Method #2:
If your goal is just to debug the app, here is another simple and straight-forward approach:
After the app is deployed, launch it manually.
Goto XCode -> Debug -> Attach to Process ... to choose your app from the list, then debug properly.
This works well for me, and it saves lots of time.
I hope this helps, thanks!

Related

Increase timeout when launching iOS app on device from Xcode [duplicate]

I am trying to launch my app on device. It is launching successfully on the simulator.
List item
I use 7.1 SDK
Xcode 5
And the device is a 7.1 iPhone 4S
I have tried:
Clean
Clean Build Folder
Deleting app
Disconnecting/Reconnecting device
Booting device
restarting Xcode
What can I do to make it work?
Could it be something with Code Signing?
Currently i have it set to 'Dont Code Sign'
I had this problem when I used a Distribution certificate instead of Developer one when running the app from Xcode. You may check it out your target --> Build Settings --> Code signing.
As #AndyDynn pointed out in his comment:
Make sure you do this on the "Target" build settings and not just the "Project" build settings.
I literally restarted my iPad, that was connected for testing the app, and that resolved the issue.
To run your app on a device, you will perform these tasks that follow:
Request a development certificate.
Add your device to the portal.
Code sign your app.
Launch your app on the device.
For more detail check this
If your provisioning profile and code sign everything is alright then try once Quit and Restart your XCode. It will work for me.
I just had this issue.
I had to open the app on device and tap Trust Computer.
No need for me to reboot everything 20 times, yay.
Below are 2 awesome hacks that have not been mentioned yet:
HACK #1:
Lock your phone, press XCode start, wait till XCode says "unlock your device to launch", then unlock your phone, it will be launched successfully, works every time.
HACK #2:
If your goal is just to debug the app, here is another simple and straight-forward approach:
After the app is deployed, launch it manually.
Goto XCode -> Debug -> Attach to Process ... to choose your app from the list, then debug properly.
This works well for me, and it saves lots of time.
I hope this helps, thanks!
I got the same problem and after looking at the answers here I found mine. The issue at hand was: my dev distribution certificate was gone from iOS Dev Center, so I just assume it had timed out. I didn't get a nice warning though, just the above error - installing worked but debugging didn't. So I had Xcode regenerate a new one for me.
One more thing to try if you've tried the above:
i found this link about quitting itunes to avoid the timeout. This works for me with xcode 5.1
In my case there was no value at Targets -> Build Settins ->Provisioning Profile. Though Code Signing looked ok)
I cleaned out my provisional profiles, rebooted the iPhone, rebooted the computer, and it worked for me.
Just to throw out an additional suggestion to anyone coming across this problem (it's been burning me frequently lately) -- try going to the Targets -> (Your Target) -> General -> Team and re-selecting the same Team, which forces Xcode to update profiles for you.
That has been the culprit for me a couple of times. Seems to happen specifically if you've recently re-downloaded a distribution certificate for new devices or w/e. Or if you've just dumped your Provisioning Profiles directory in general.
I had the same problem and I tried all the suggested steps but I managed to get it deployed and run only after I powered off my iphone.
Checked my Targets and code signing details, didn't help. I did three things:
Clean Build Folder
Close Xcode and delete everything in Derived Data
Rebooted my device
Everything worked fine after that. I had changed some App Transport Security setting in my info.plist right before this occurred. Not sure if it is related or if only one of my 3 steps were necessary, but it worked.
Make sure the Provisioning Profile setting in your environment is set to your development profile: Project > Build Settings > Code Signing
Consider setting it in your Target settings and the Pod project (in case using Cocoa Pods).
In case the development profile is not present create or download it:
Certificates, Identifiers & Profiles > Provisioning Profiles
After following the above, it still didn't work (from xCode 6). But after rebooting the phone and deleting the app, it worked.
Check Product Name for dots "."
"." are not allowed in Product name.
Selection in provisioning profiles may cause this problem. So while launching an app on to the device, make sure you are using the development profile & not the distribution profile. I have been facing the same issue. But got away with it using the same process.
Check for Project > Build Settings > Provisioning profile & select your development profile.
And also take care of Code Signing Identity in the same tab. Make sure you choose both the identities of Developer & NOT of Distribution.
Below two steps solved for me:
For xcode version: 7.2
1.Select any of your simulator to run ( just start your run, no need to load the app completely).
2.Stop it.
3.Then select your device and run.
This solved in my case.
option + command + shift + k and then run the project did the trick for me.
If your goal is to just launch the app and debug it, you can also edit the schema to "Wait for executable to be launched" and run the app manually.
The setting is under Edit schema > Run > Info > Launch. Choose "Wait for executable to be launched" instead of "Automatically". It will wait for you to run the app (by manually tapping it) instead of timing out.
As all of the above answers didn't helped for me I'll publish my solution:
Deleting all the occurrences of xcuserdata folders in .xcodeproj and .xcworkspace and restarting Xcode fixed the problem. To delete it right click your_app_name.xcodeproj and/or your_app_name.xcworkspace in your app folder and select "Show Package Contents". I hope that help someone to save some time.
Just restart my Device and works everything fine
I tried:
Restart the device (iPhone)
Clean build the XCode project
Then it works.
Check whether the device memory is full.

Cannot verify client 3000

I am using xcode 7.1 and trying to upload my app to the app store directly through xcode. While uploading I am getting a weird error:-
cannot verify client 3000
Note:- I recently made changes in the accounts (xcode preference section). Is this related to my error?
I also restart the xcode but issue still there?
I already checked this question on SO, but they say restart your xcode. But this does not solve my problem.
For my case,I got this error after selecting "Generic iOS Device" when archiving, however i plugged in my iPhone and selected it, then archived, I got no errors this time.(I also cleaned both Shift+cmd+k and Shift+alt+cmd+k before archiving)
I encountered the same issue the first time I tried to submit to app store with the target on my device.
What worked for me:
I retried a couple of minutes later without changing a thing and everything went smooth.
This is temporary apple server bug. Try it again OR Retry after some time it will fix the problem.
Thanks
There is no need to reinstall Xcode. Just wait a few minutes and try again and it will work.
I tried :
waiting days,
restarting,
deleting the developer account in
preferences,
submitting archives from a connected device,
submitting
archives from a iOS generic device.
Nothing worked.
I needed to:
create an archive (it was from a connected device),
in the organiser window select the export button (on the right hand side underneath the "Upload to App Store" button.
Select that the export is for app store distribution.
Wait.
Take a note of the location the .ipa file is saved to.
Go back to Xcode, then select the menu item Xcode > Open Developer Tool > Application Loader.
Select Deliver Your App, and select choose.
Navigate to your .ipa file noted above.
Select next, wait, next, check for any error message, send.
Hope this helps someone.
I got this error while uploading my distribution archive to App Store with selecting Distribution provisioning profile scheme -> Product -> Archive -> Upload to App Store. The error is based on I chose my real iphone device in Xcode by mistake. You need to choose "Generic iOS Device" and repeat same steps as I mentioned before.
You have to plug in your iPhone to your Mac and try to upload to AppStore again.
For some reason, validating the archive before uploading fixed the issue for me.
With Xcode 7.1, I could only make a successful build without bitcode. Try it out if everything else fails.
I resolved this by exporting ("export" in xcode archive organizer -> "to iOS App Store") and using the Application Loader instead of xcode to submit.
It is recurring. Seems to me like an internal error with apples identification service or so.
My definite solution:
Get yourself a cup of tea and try it again.
You can, of course, do some voodoo or change the target device or something, but re-trying after a while will do.
I have the same issue.
I did the below steps:
Step 1: Select Code Signing Identity for "Release"
Step 2 : Select Distribution profile
I tried to use Application Loader instead and it worked well. Maybe that helps
I've been having this problem since Xcode 7.1 (for more than a month). I did everything I could trying to solve this: restart Xcode, clean project, clean build folder, build with a device connected, reinstall Xcode multiple times, even formatting the whole disk and starting from scratch. None of this worked.
During this time my colleague was always able to upload the very same builds to App Store without any problem.
Curiously, what solved this problem for me was disconnecting my non-Apple wireless mouse.
I found this out when I tried to submit an app from my home computer and got the same error. I disconnected the mouse dongle, tried again and it went through.
I've verified this three times both on my home (MacBook Pro 2013) and work computer (Mac Mini 2014).
This leads me to believe that during the app submission process Apple may check if your environment is purely made by Apple or not, and may block your submission based on that. This would explain the "Cannot verify client" message.
This one worked for me:
Delete the Archive that failed during upload.
Clean the solution.
Rebuild the solution.
Archive the it.
Go to Xcode's Organizer, then Validate (this should be 'Successful').
Upload the build.

Cannot Verify Client error 3000 with API problems [duplicate]

I am using xcode 7.1 and trying to upload my app to the app store directly through xcode. While uploading I am getting a weird error:-
cannot verify client 3000
Note:- I recently made changes in the accounts (xcode preference section). Is this related to my error?
I also restart the xcode but issue still there?
I already checked this question on SO, but they say restart your xcode. But this does not solve my problem.
For my case,I got this error after selecting "Generic iOS Device" when archiving, however i plugged in my iPhone and selected it, then archived, I got no errors this time.(I also cleaned both Shift+cmd+k and Shift+alt+cmd+k before archiving)
I encountered the same issue the first time I tried to submit to app store with the target on my device.
What worked for me:
I retried a couple of minutes later without changing a thing and everything went smooth.
This is temporary apple server bug. Try it again OR Retry after some time it will fix the problem.
Thanks
There is no need to reinstall Xcode. Just wait a few minutes and try again and it will work.
I tried :
waiting days,
restarting,
deleting the developer account in
preferences,
submitting archives from a connected device,
submitting
archives from a iOS generic device.
Nothing worked.
I needed to:
create an archive (it was from a connected device),
in the organiser window select the export button (on the right hand side underneath the "Upload to App Store" button.
Select that the export is for app store distribution.
Wait.
Take a note of the location the .ipa file is saved to.
Go back to Xcode, then select the menu item Xcode > Open Developer Tool > Application Loader.
Select Deliver Your App, and select choose.
Navigate to your .ipa file noted above.
Select next, wait, next, check for any error message, send.
Hope this helps someone.
I got this error while uploading my distribution archive to App Store with selecting Distribution provisioning profile scheme -> Product -> Archive -> Upload to App Store. The error is based on I chose my real iphone device in Xcode by mistake. You need to choose "Generic iOS Device" and repeat same steps as I mentioned before.
You have to plug in your iPhone to your Mac and try to upload to AppStore again.
For some reason, validating the archive before uploading fixed the issue for me.
With Xcode 7.1, I could only make a successful build without bitcode. Try it out if everything else fails.
I resolved this by exporting ("export" in xcode archive organizer -> "to iOS App Store") and using the Application Loader instead of xcode to submit.
It is recurring. Seems to me like an internal error with apples identification service or so.
My definite solution:
Get yourself a cup of tea and try it again.
You can, of course, do some voodoo or change the target device or something, but re-trying after a while will do.
I have the same issue.
I did the below steps:
Step 1: Select Code Signing Identity for "Release"
Step 2 : Select Distribution profile
I tried to use Application Loader instead and it worked well. Maybe that helps
I've been having this problem since Xcode 7.1 (for more than a month). I did everything I could trying to solve this: restart Xcode, clean project, clean build folder, build with a device connected, reinstall Xcode multiple times, even formatting the whole disk and starting from scratch. None of this worked.
During this time my colleague was always able to upload the very same builds to App Store without any problem.
Curiously, what solved this problem for me was disconnecting my non-Apple wireless mouse.
I found this out when I tried to submit an app from my home computer and got the same error. I disconnected the mouse dongle, tried again and it went through.
I've verified this three times both on my home (MacBook Pro 2013) and work computer (Mac Mini 2014).
This leads me to believe that during the app submission process Apple may check if your environment is purely made by Apple or not, and may block your submission based on that. This would explain the "Cannot verify client" message.
This one worked for me:
Delete the Archive that failed during upload.
Clean the solution.
Rebuild the solution.
Archive the it.
Go to Xcode's Organizer, then Validate (this should be 'Successful').
Upload the build.

Xcode process launch failed: Security

I have been developing an app for 1 or 2 weeks now and just yesterday I have updated my iPhone 5S to the iOS 8 GM. Everything worked fine and I could test on my device as well until I deleted the app from my phone and wanted to build again. The following error appeared:
Could not launch "My App"
process launch failed: Security
When I test with the simulator it works fine.
Is this because of the iOS 8 GM update and how can I fix this launch problem?
I want to be able to test on my iPhone and in the simulator.
If you get this, the app has installed on your device. You have to tap the icon. It will ask you if you really want to run it. Say “yes” and then Build & Run again.
As from iOS 9, it is required to go to Settings → General → Device Management → Developer App → Trust`.
On some versions of iOS, you will have to go to Settings → General → Profile instead.
Updated answer for Xcode 7: Tapping the app no longer works (as of beta 1 it just displays an "untrusted enterprise developer" message with only a Dismiss button).
To fix, open the Settings app, go to General / Profiles, and you'll see your profile. Mark it trusted and things should start working normally again.
Updated For iOS 9.2.1 and Xcode 7.2.1:
Goto: Settings > General > Device Management > Select App from Developer Apps > Trust App.
Hey so the accepted answer works, except if you need to debug the initial launch of the app. However I think that answer is more of a work around, and not an actual solution. From my understanding this message occurs when you have some weirdness in your provisioning profile / cert setup so make extra sure everything is in tip-top shape in that dept. before ramming your head against the wall repeatedly.
What worked for me was as follows from the apple docs:
Provisioning Profiles Known Issue If you have upgraded to the GM seed
from other betas you may see your apps crashing due to provisioning
profile issues.
Workaround:
Connect the device via USB to your Mac
Launch Xcode Choose Window ->Devices
Right click on the device in left column, choose "Show
Provisioning Profiles"
Click on the provisioning profile in question
Press the "-" button Continue to removing all affected profiles.
Re-install the app
Make sure you right click on the image of the device not the name of the device or you won't see the provisioning profiles option. I restored my new phone from an old backup and there was a lot of cruft hanging around, i also had 2 different dev. certs active (not sure why) but i deleted one, made a new profile got rid of all the profiles on device and it worked.
Update for iOS9.2.1 and Xcode 7.2.1
If you get this error when building to a device in Xcode:
On your device, tap the app icon that would have just been added from your attempt at building the app and you should see this:
Next, on your device, go to Settings --> General --> Device Management, and you will see this page:
Select the profile you are using with Xcode, and you should see this page:
Click Trust "username#email.com" then click Trust on the next popup.
Go back to Xcode and re-run your project and it should build the app to your device.
To get around the process launch failed: Security issue and immediately launch the app on your device, tap the app icon on your iOS device after running the app via Xcode.
This will allow you to immediately run the app. It may not actually "fix" the root issue that is causing these permission alerts.
Be sure to tap the app icon while the Xcode alert is still shown. Otherwise the app will not run. I continually forget this vital step and am unable to run the app on my device. Thus I am documenting it here for myself and everyone else :)
Run the app via Xcode. You will see the security alert below. Do not press OK.
On your iOS device, tap the newly installed app icon:
After tapping the icon, you should now see an alert asking you to "Trust" the Untrusted App Developer. After doing so the app will immediately run, unconnected to the Xcode debugger.
If you do not see this "Trust" alert, you likely pressed "OK" in Xcode too soon. Do not press "OK" on the Xcode alert until after trusting the developer.
Finally, go back and press "OK" on the Xcode alert. You will have to re-run the app to connect the running app on your iOS device to the Xcode debugger.
Go to SETTINGS -> GENERAL -> Profiles & Device Management
and choose the developer profile, then push Trust.
if you do not have Profiles & Device Management menu, you have to enroll your device on beta.apple.com and download the profile from Safari.
Install the profile
Restart your device
Tap on the developer profile and trust.
You are all set.
I have the same issue. I click ok in xcode and when launching the app on my iPhone I'm asked if I want to trust this application. Doing it, the app runs and further build-and-run from xcode went without any issue until deleting the app from the iPhone and reinstalling it. Then goto first line ;-)
Alternatively if one does not see "Untrust App Developer" dialog:
Go to your iPhone > Settings > General > Profile > "you#email.com" > Trust
In iOS 9.2 they renamed the 'Profiles' to 'Device Management'
This is how you should do it now:
Settings -> General -> Device Management
Verify the app
Ok, this seems late and I was testing the app with the Internet connection off to test my app for some functionality. As I turned off the Internet, it gave me such an error. After I turned on the Internet, I could install it again. I know this is silly but this might be helpful to someone.
I had this issue before on Xcode 7. Then I realized it's all about my Internet connection: it was down, and the security check was using the
Internet to make sure your developer account is correct. And when it saw no Internet it gave this error … after I have fixed my Internet, it works well.
Xcode is able to build and install the app, but isn't able to launch it the first time. You just need to tap on the app's icon on the phone, then you will be prompted to ask if you want to trust the developer. Allow it and the app will launch, then Xcode will be able to automatically install & launch this and your other apps.
"If you get this, the app has installed on your device. You have to tap the icon. It will ask you if you really want to run it. Say “yes” and then Build & Run again."
To add to that, this only holds true the moment you get the error, if you click OK, then tap on the app. It will do nothing. Scratched my head on that for 30 odd minutes, searching for alternative ways to address the problem.
BTW, this also happens if you change the team of your target in Xcode and rebuild. Was quite puzzled to see that problem with an app that I had run on the device before. Took me a while to figure out…
Might only happen the first time building to a device with a team, though.

Could not launch process launch failed: timed out waiting for app to launch

I am trying to launch my app on device. It is launching successfully on the simulator.
List item
I use 7.1 SDK
Xcode 5
And the device is a 7.1 iPhone 4S
I have tried:
Clean
Clean Build Folder
Deleting app
Disconnecting/Reconnecting device
Booting device
restarting Xcode
What can I do to make it work?
Could it be something with Code Signing?
Currently i have it set to 'Dont Code Sign'
I had this problem when I used a Distribution certificate instead of Developer one when running the app from Xcode. You may check it out your target --> Build Settings --> Code signing.
As #AndyDynn pointed out in his comment:
Make sure you do this on the "Target" build settings and not just the "Project" build settings.
I literally restarted my iPad, that was connected for testing the app, and that resolved the issue.
To run your app on a device, you will perform these tasks that follow:
Request a development certificate.
Add your device to the portal.
Code sign your app.
Launch your app on the device.
For more detail check this
If your provisioning profile and code sign everything is alright then try once Quit and Restart your XCode. It will work for me.
I just had this issue.
I had to open the app on device and tap Trust Computer.
No need for me to reboot everything 20 times, yay.
Below are 2 awesome hacks that have not been mentioned yet:
HACK #1:
Lock your phone, press XCode start, wait till XCode says "unlock your device to launch", then unlock your phone, it will be launched successfully, works every time.
HACK #2:
If your goal is just to debug the app, here is another simple and straight-forward approach:
After the app is deployed, launch it manually.
Goto XCode -> Debug -> Attach to Process ... to choose your app from the list, then debug properly.
This works well for me, and it saves lots of time.
I hope this helps, thanks!
I got the same problem and after looking at the answers here I found mine. The issue at hand was: my dev distribution certificate was gone from iOS Dev Center, so I just assume it had timed out. I didn't get a nice warning though, just the above error - installing worked but debugging didn't. So I had Xcode regenerate a new one for me.
One more thing to try if you've tried the above:
i found this link about quitting itunes to avoid the timeout. This works for me with xcode 5.1
In my case there was no value at Targets -> Build Settins ->Provisioning Profile. Though Code Signing looked ok)
I cleaned out my provisional profiles, rebooted the iPhone, rebooted the computer, and it worked for me.
Just to throw out an additional suggestion to anyone coming across this problem (it's been burning me frequently lately) -- try going to the Targets -> (Your Target) -> General -> Team and re-selecting the same Team, which forces Xcode to update profiles for you.
That has been the culprit for me a couple of times. Seems to happen specifically if you've recently re-downloaded a distribution certificate for new devices or w/e. Or if you've just dumped your Provisioning Profiles directory in general.
I had the same problem and I tried all the suggested steps but I managed to get it deployed and run only after I powered off my iphone.
Checked my Targets and code signing details, didn't help. I did three things:
Clean Build Folder
Close Xcode and delete everything in Derived Data
Rebooted my device
Everything worked fine after that. I had changed some App Transport Security setting in my info.plist right before this occurred. Not sure if it is related or if only one of my 3 steps were necessary, but it worked.
Make sure the Provisioning Profile setting in your environment is set to your development profile: Project > Build Settings > Code Signing
Consider setting it in your Target settings and the Pod project (in case using Cocoa Pods).
In case the development profile is not present create or download it:
Certificates, Identifiers & Profiles > Provisioning Profiles
After following the above, it still didn't work (from xCode 6). But after rebooting the phone and deleting the app, it worked.
Check Product Name for dots "."
"." are not allowed in Product name.
Selection in provisioning profiles may cause this problem. So while launching an app on to the device, make sure you are using the development profile & not the distribution profile. I have been facing the same issue. But got away with it using the same process.
Check for Project > Build Settings > Provisioning profile & select your development profile.
And also take care of Code Signing Identity in the same tab. Make sure you choose both the identities of Developer & NOT of Distribution.
Below two steps solved for me:
For xcode version: 7.2
1.Select any of your simulator to run ( just start your run, no need to load the app completely).
2.Stop it.
3.Then select your device and run.
This solved in my case.
option + command + shift + k and then run the project did the trick for me.
If your goal is to just launch the app and debug it, you can also edit the schema to "Wait for executable to be launched" and run the app manually.
The setting is under Edit schema > Run > Info > Launch. Choose "Wait for executable to be launched" instead of "Automatically". It will wait for you to run the app (by manually tapping it) instead of timing out.
As all of the above answers didn't helped for me I'll publish my solution:
Deleting all the occurrences of xcuserdata folders in .xcodeproj and .xcworkspace and restarting Xcode fixed the problem. To delete it right click your_app_name.xcodeproj and/or your_app_name.xcworkspace in your app folder and select "Show Package Contents". I hope that help someone to save some time.
Just restart my Device and works everything fine
I tried:
Restart the device (iPhone)
Clean build the XCode project
Then it works.
Check whether the device memory is full.

Resources