Using Xcode beta 9 (v4), I'm trying to launch the app by clicking on the "play" button. I get a "build succeeded" but right before launching, a popup message appears in Xcode:
"iPhone has denied the launch request."
It used to work yesterday. It does work on the simulator. I've rebooted my computer, the iPhone, uninstall the app, cleaned the build. Running out of ideas.
It may be code sign issue. Make sure you're signing with developer, not distribution.
It happens using Xcode 9.x or newer.
I tracked this problem down to the "debug executable" checkbox in the product scheme (product->scheme->edit scheme->info->debug executable checkbox). I unchecked that and this stopped happening (as well as a couple other weird issues - no output in console being one).
I have a workaround:
If you change the scheme to 'Ask on Launch' it works.
In Xcode top bar
Product > Scheme > Edit Scheme > 'Info' tab > Executable: "Ask on Launch"
It's slightly annoying but it works.
After getting "denied launch request" error, do this:
Edit Scheme -> Info -> Executable -> Ask on Launch
This worked for me with adhoc profile.
Simple restarting of the iPhone helped me out.
Got this with Xcode 9.0 while deploying to a non-simulated iPhone 6s with iOS 10.3.
I had force-quit the app right before this arose. Otherwise, nothing had changed; all the developer signing credentials was still trusted, and the app was still marked Verified in the iPhone's Settings.
The trick that fixed it was turning the iPhone off and then turning it back on again.
Looking at my logs, it appears applicationWillTerminate
was triggered a while before this happened; the instance of the app that I thought I force-quit must have been some zombie process?
For me issue was due to code signing the app with Ad hoc profile.
After changing the code signing to developer profile,from xcode settings general tab the above issue got resolved.
I got this issue recently and I found the solution for this crazy issue. This are the Scheme Issue to fix this issue follow following steps.
- Click Edit Scheme top Navigator Tab.
- Click Info on Run menu.
- On Executable dropdown select "Ask on Launch" option -> Then Close and run the build once.
This solved my problem when I got this issue.
The problem is that xcode 'times out' after certain seconds. The fix is to edit the scheme and ask xcode to 'wait' until the executable is launched.
In Edit Scheme, check 'Wait for executable to be launched' instead of 'Automatically'
The problem for me was that I was using a free developer account (simply signed in with my Apple ID). When looking at the device logs I found (bold added)
(RequestDenied); reason: "The request was denied by service delegate (SBMainWorkspace) for reason: Security ("Unable to launch {com.my.bundleID} because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user")"
That made me realize that I needed to go into Settings
-> General
-> Device Management
-> {My Apple ID}
-> Trust
After that, everything worked as expected.
In previous versions of iOS I would encounter a dialog on my device that would tell me that this was the problem. Maybe Apple took it out for iOS 11. 🤔
I attentively read all answers but they don't help me. My solution:
- Go to Xcode preferences, select accounts (⌘ + ,)
- Select your Apple ID, choose team and click Manage Certificates
- In Pop up menu in bottom left corner click + button and select iOS Development, then click done and close popup
- Try to relaunch application, now it's should fine.
It may cause with switched a wrong branch with Git, Make sure the branch you switch not too old(since it may cause code sign issue), And on the right branch if this still bothering, select the development Provisioning Profile under Signing(Debug) if u r not Automatically manage siging.
These simple steps helped me.
- Remove your connected iPhone, iPad from the mac.
- Restart your device.
- Select "Automatically manage signing" in Xcode settings.
- Reconnect your iPhone, iPad.
Just tick "Automatically manage signing" in General -> Signing properties of the Target. It will create Development provisioning profile for you and running on the device will work.
I face this issue on Xcode 9.1
Scenario: I checked "Connect via Network" option for device. And trying to run app to this device with USB cable attached.
Fix: Simply remove USB cable and run.
I'have tried all the answers nothing worked for me, The problem is coming form Xcode itself and has nothing to do with profiles and certificate :
Product > Scheme > Edit Scheme
In Run (Section) / info (tab) [select] the Release instead of debug as Build Configuration as follow :
It's a regression since Xcode 10.1
Config : Xcode Version 10.1 (10B61) Iphone X / IOS 12.1.4
I had the same issue . Its a bug in Xcode 9.1. There is a trick to make it work for now. Lock your phone. Run the code. Xcode will ask to unlock the iPhone.
I just cleared the profiles with the Apple Configurator, restarted the iDevice and worked again as usual.
It's an intermittent bug in Xcode - I just stopped and started all my devices and it magically worked (after messing about for 1/2 hour) I had upgraded MacOS overnight to 10.13.04 which obviously upset something! Xcode 9.3, iOS 11.3 watchOS 4.3
Let me tell you a workaround which solves my problem:
- Step 1: Windows > Devices and simulator.
- Step 2: Unpair device.
- Step 3: Reconnect device and trust.
- Step 4: Run the application. BINGO.
For me this issue was related to a Manually installed Enterprise Certificate and having to use it for both development and release schemes. I had to trust the certificate on the device before it would allow the app to be launched, but it would never launch as I kept getting that denied message. Eventually, editing the scheme and setting it to wait for the app to be attached before debugging did the trick.
Open the App Groups
in Capabilities, wait App...
effective,then close the App Groups
, it worked:

After seeing all the solutions given across web, i finally found one and here are those:
- Error occurs because of it makes Runner confused about what profile to use.
- You will most often get this error, when you have added new account in profile in Xcode > Targets > Signing.
- You can remove this error by just using before one Profile.
- There is no need to create New Users.
- or you can sign in with account you are using in Profile in your iPhone (i did this!)
Happy Days :)
In case this problem occurred for you a couple of days before today, 2019-Mar-20, it is very likely related to the fact that faulty code signing certificates were issued. In that case you should be able to resolve it by just recreating the code signing certificate. This SO question already has an answer that explains you how to do so.
I'm not sure whether it's a fix, or just another workaround, but uninstalling the application from my device helped. I'm still not sure what caused it, but @MrRogers answer helped me figure it out.
Today,I also meet this question.This is my way to solve. Xcode 9.0,iPhone 6s,Automatically manage signing with my account. When I select "iPhone 6s",I found that there is an logo after the iPhone 6s It's the new function of Xcode 9.0 that can run an app on the iPhone without a string connect computer(iPhone and Mac must connect the same Network). So, I try to change this kind of connect way. Open "Devices and Simulators"-> unselect "Connect via network" And then, I clean, rebuild and run my project.It works! I will be happy if this method can help you.
This error occurred for me when upgrading an Xcode 8 project to run in Xcode 9, however the iOS Base SDK in the Build Settings is still at the previous version of iPhoneOS10.3.sdk and says SDK not found. However that application still builds and runs on a device but it fails to launch. Updating the iOS Base SDK to iOS 11.0 fixes this launch problem.
I had a similar problem and in my case, the problem was in the Build Settings of my target. The Mach-O Type was set to "Dynamic Library" instead of "Executable".
I faced this issue while running an old codebase. I just disabled the background fetch option from EditScheme, it worked.
Edit Scheme -> Options Tab -> Disable Background Fetch
来源:https://stackoverflow.com/questions/45421179/xcode-9-error-iphone-has-denied-the-launch-request