Device denied the launch request error

I am simply trying to run my app on my iPad through lightning cable but I am getting this strange error:


Could not launch "[App Name]"

[Device name] denied the launch request


I have looked all over the internet for an answer to this but cant seem to find a good solid fix.


I have tried everything from deleting the app on my iPad to cleaning the project to restarting many times but nothing will work. Right now I am running Xcode 9 beta so I tried switching to Xcode 8.3.3 and testing it there. I get a different error:


Could not launch "[App Name]"

process launch failed: Unspecified



Next, I tried doing it on the simulator to see if it was any different. The outcome was a continuous loop of the app opening and crash, then opening again, and crashing again. After about five minutes of this loop, I got this error:


The request to open "com.hp.Goal-Tapper" failed.

The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified.


Does anyone know how to fix this? I am a beginner at Xcode and swift so I won't know very complicated things. Thanks in advance. Any help is appreciated.

I'm having this same problem after updating my iPhone 6 to iOS 11.1 and Xcode to 9.1 Beta. I've tried toggling the "Automatically manage signing" checkbox in Xcode. Other people have reported success from this but it hasn't fixed my issue. The app will run on the iPhone after being updated by Xcode, but it will not run attached to Xcode.

I'm also seeing this in XCode 9 when running my scheme in Release with manual signing. My app previously ran on the provisioned device with no problem. XCode also confirms that the certificate and provisioning profiles are up to date, and my device is in the provisioned device list. But I still get this error:

Could not launch "[App Name]"

[Device name] denied the launch request


I have success with switching to Automatically manage signing and then it will run in Release.


For now, I guess I'm going with Automatic code signing. But I'd like to know what the real fix is here.

I had gotten the problem to go away by fixing the app icon. It had been 1039x1039 and when I took it down to 1024x1024, the problem went away.


But it's back today! Xcode 9.1 Beta 9B37, Mac OS 10.12.6, iOS 11.1 on iPhone 6.


I worked successfully without this problem for quite a while today before it quit working. Odd.

i had same issue, also automatically manage signing was turned off, but the reason was signing certificate was ad hoc for release scheme. Changed to proper distribution signing and worked just fine

Accepted Answer

I fix it by this:


Edit Scheme -> Info -> Executable -> Ask on launch

Thank god!!



http://upload-images.jianshu.io/upload_images/663014-d5d182e310052664.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240

Same error here, with Xcode 9.1 on a brand-new iPhone X, using manual Developer profiles. Haven't found a workaround yet. Can someone at Apple please look into this bug?! It's wasting literally hours.

Sad to say I'm still struggling with this also. I can't get the app to work on Simulator or on my iPhone 6. Well, it loads and works on both if the app is started manually, but I'm not able to attach the debugger in either case.


Having more than one Xcode version installed can be a problem, but I've trashed (and emptied) all except Xcode 9.1.


This is really frustrating!

Same problem here. Normally I have this bug once or twice a day and restarting my MacBook and my iPhone solved it. But today I can run like once every 20 tries or so... It's really a waste of hours and hours of trying to get the app to run. For me device AND simulator don't work!


PLEASE Apple... look into this issue and try to get the developer tools working again!!! Currently is such a pain! Clean building my swift project takes like 20 min and then I can't even install it... Thats really annoying!

Wow! This worked for me also. How in the world did you ever find this?


I can now Run on my iPhone and get debugging info on the console. Woohoo!

See the fix reported by haozes. Worked for me. It's a workaround rather than a true fix, but it's very easy.

This is not working for me. When I try it, after building/installing the app it immediately says "Finished running [app]" and the app never actually runs. :/

I saw this on Xcode Server more and more often on Xcode 9, like I tried 60 integrations, but only works for 2 times, anyone from apple can take a serious look at this ssue?

Same here, this is so annoying

Worked on my side, but it's really quirky to manuallay select the appropriate project each launch.

It works, but I don't get breakpoints when I do this.

I had this issue when I had pending alerts for my settings. I happened to just update to iOS12, and hadn't finished setting up a phone lock screen, password etc. After addressing those settings, I no longer had the issue.

Not wokring, other message came up, "unable to launch com.xxxx"

tried editing scemes , creating new certs and profile even tried restsrating the system and resetting the entore phone . Nothing worked . still getting "unable to launch ... " and "iphone rejeted ..." Any help will be very appreciated

This solution saves my day. But why Edit Scheme -> Info -> Executable -> Ask on launch

will work? I don't understand...

Just do the following: 1. Uncheck the Automatically manage signing option in the General tab of target settings 2. Fully close Xcode 3. Delete .mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/ (not necessarily for me but to be safe) 4. Delete the following certificates in Keychain Access: • iPhone Developer: xxx@xxx.xxx (xxxxxxxxx) • Developer ID Certification Authority • Apple Worldwide Developer Relations Certification Authority 5. Remove your app from your iOS device/s 6. Reboot your Mac and iOS device/s 7. Change the Bundle Identifier to anything else (you might change it back after it works) 8. Plug in your devices, click on Build, then Run, trust your certificate on your iOS devices (in my case I left my iPhone plugged in while it reboots) 9. It should work now. You’re welcome.

I had error "The request to open MyProject-DevelopmentUITests.xctrunner" failed. The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified." when launching XCTest from test navigator. I had empty row in test plan environment variable teble. Removing that fixed the issue.

WORKING SOLUTION:
Connect your macbook to the emulator device. You need to enable your emulator device to accept apps developed from your apple developer ID. To do this, go to Settings on your emulator device (iPad/iPhone).
Settings-->General-->Device Management.
Select the developer ID that is displayed and click "Trust"

Hello, I know this thread is a bit old but I recently came across the same problem with the simulator and this is what helped me fix it:

Go to Edit Scheme -> Arguments -> Environment Variables

For me, I had accidentally hit the + and added an empty variable. Once I deleted that variable so there was no checkmark under, the app ran like there was no problem!

Hope this helps.
I fixed this by going to Product->Scheme->Edit scheme select RUN, I had arguments passed on launch check box ticked, but were empty, so unticked the box. hey presto, my app would run on simulator.
Solved for me.
The previous two suggestions (removing an empty runtime environment variable) worked for me. This appears to be a variable that's generated by Xcode, not something that I accidentally added.
Device denied the launch request error
 
 
Q