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.

Answered by haozes in 274835022

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: ***@***.*** (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