I've been updating an application for more than 5 years without problems, until yesterday.
I updated my iPad to iOS 12, but, each time I try to run it, I got the message:
iPad has denied the launch request
I tested in other physical devices with iOS 11 and simulators, and this error happens only with the devices with iOS 12.
What I tried to solve this?
- Re-generate my certificates in the Apple Developer page.
- Editing my scheme to 'Debug Configuration' to 'Release' and checking and unchecking 'Debug executable'.
- Restart my Mac and restart the iPad
- Enabling and disabling 'Wait for executable to be launched'
And also, each solution of this thread: Xcode 9 error: "iPhone has denied the launch request"
And after try each one of those alternatives, the problem persist only with the devices WITH iOS 12.
Someone has an idea about how can solve this?
UPDATE I debugged my app, and this is whole the log:
predeterminado 10:33:00.516648 -0600 trustd cert[0]: MissingIntermediate =(leaf)[force]> 0
predeterminado 10:33:00.516722 -0600 trustd cert[0]: NonEmptySubject =(path)[]> 0
predeterminado 10:33:00.521320 -0600 SpringBoard [com.mycompany.myapp] Generating image data for snapshot: <XBApplicationSnapshot: 0x1115c11f0; identifier: 5E831360-7FEE-4255-A6FB-08712EF1D226; launchInterfaceIdentifier: __from_UILaunchStoryboardName__; contentType: GeneratedDefault> {
creationDate = 20 de septiembre de 2018, 10:33:00 a. m. GMT-6;
keepsImageAccessUntilExpiration = NO;
hasGenerationContext = NO;
context = {
contentType = GeneratedDefault;
fullScreen = YES;
referenceSize = {1024, 1366};
interfaceOrientation = LandscapeLeft;
additionalContext = {
statusBarSettings = <XBStatusBarSettings: 0x282f43d00; hidden: NO; style: 0x0; backgroundActivityEnabled: NO>;
}
}
imageContext = {
scale = 2.0;
opaque = YES;
fileRelativeLocation = none;
}
}
predeterminado 10:33:00.585893 -0600 SpringBoard com.mycompany.myapp:10:11:3:1:Application replaced
predeterminado 10:33:00.592674 -0600 SpringBoard [com.mycompany.myapp] Application installed using default data provider
predeterminado 10:33:00.638304 -0600 dasd com.apple.CFNetwork-cc-87-19005-Task <6A4245D9-BABF-4974-899B-B744DCB219AE>.<com.apple.cloudkit.cloudd>.<route=usmia-edge.icloud-content.com:outOfProcess=T:allowExpensive=T:powerNap=F:adaptive=T:app=com.apple.mobileslideshow:2app=com.apple.mobileslideshow.PhotosMessagesApp:disc=T:retry=F:pool=com.apple.cloudkit.BackgroundConnectionPool:uuid:C3F50637-0E71-4FCD-A8B5-DB01E2F3D518>.<1>:9D4C2B:[
{name: ApplicationPolicy, policyWeight: 5.000, response: {Decision: Can Proceed, Score: 0.31}}
{name: DeviceActivityPolicy, policyWeight: 10.000, response: {Decision: Can Proceed, Score: 0.60}}
] sumScores:58.471249, denominator:65.910000, FinalDecision: Can Proceed FinalScore: 0.887138}
predeterminado 10:33:00.662238 -0600 SpringBoard [com.mycompany.myapp] Snapshot data for <XBApplicationSnapshot: 0x1115c11f0; …08712EF1D226> written to file: /private/var/mobile/Containers/Data/Application/1DB50DD3-CF52-4498-854F-C0939D28ECC0/Library/Caches/Snapshots/com.mycompany.myapp/5E831360-7FEE-4255-A6FB-08712EF1D226@2x.ktx
predeterminado 10:33:00.666489 -0600 trustd cert[0]: MissingIntermediate =(leaf)[force]> 0
predeterminado 10:33:00.687764 -0600 TVRemoteConnectionService XPC: Recieved an application registered LaunchEvent
predeterminado 10:33:00.909692 -0600 trustd cert[0]: MissingIntermediate =(leaf)[force]> 0
predeterminado 10:33:00.910738 -0600 trustd cert[0]: SubjectCommonName =(leaf)[]> 0
predeterminado 10:33:00.910872 -0600 trustd cert[0]: LeafMarkerOid =(leaf)[]> 0
predeterminado 10:33:00.912183 -0600 trustd cert[0]: MissingIntermediate =(leaf)[force]> 0
predeterminado 10:33:00.912253 -0600 trustd cert[0]: AnchorApple =(path)[]> 0
predeterminado 10:33:00.912321 -0600 trustd cert[0]: ChainLength =(path)[]> 0
predeterminado 10:33:00.912399 -0600 trustd cert[0]: IssuerCommonName =(path)[]> 0
predeterminado 10:33:00.943350 -0600 trustd cert[0]: MissingIntermediate =(leaf)[force]> 0
predeterminado 10:33:00.943416 -0600 trustd cert[0]: NonEmptySubject =(path)[]> 0
predeterminado 10:33:00.972795 -0600 trustd cert[1]: AnchorTrusted =(leaf)[force]> 0
I wanted to expound on the answer a little, to offer a little more detail based on what I have gone through and learned fighting this issue, and for those who, like myself, are new to Xcode and iOS development. And as in my case, I just needed to get it running as fast as possible.
My scenario was I have an Ionic 3 iOS app running on some iPads for a local non-profit as welcome desk checkin kiosk, so this app doesn't need to be public on the store. The app was crashing after a few days, and then I found out after weeks of research that it was my Apple developer account, not a bug or memory leak.
So I re-setup my Apple developer account, created new and updated signing certificates and Ad-hoc provisioning profiles with these iPads on them so they wouldn't crash any longer. I started to run the app on the devices with my shiny new certificates and profiles... and then chased this "iPad has denied the launch request" mess for a couple hours.
Here's what I learned:
Try to edit your Run Scheme first.
If the app already exists on the target device, then just set the Executable setting to "Ask on Launch", by going to Product → Scheme → Edit Scheme...
Make sure Run on the left is selected, and then open the options for Executable on the right, under the Info tab. Select "Ask on Launch", then Close.
When you try to Run the app again, a pop-up with the available apps on the target device will appear, and you will need to select your "appName.app", then click Run.
Don't see your "appName.app"?, then this is a fresh install, click Cancel.
If this is a fresh install, you will have to make sure Executable is set to your "appName.app". It will deny your first Run attempt, but it will have installed the app on the device. Then go back and reset Executable to "Ask on Launch" and then Run again. The "appName.app" should be in the list now.
If editing your Run Scheme doesn't get it up and running...
I'd advise next looking at your Apple developer certificates and make sure they are in line and up to date.
Take a quick peak by clicking on the info circle (i) icon next to your signing profiles.
Manage your certificates here... https://developer.apple.com/account/ios/certificate
You can also have Xcode download your certificates, or just look at them listed out by going to Xcode → Preferences:
Then make sure you are on the Accounts tab, select your Apple ID on the left side, and then look on the bottom right for the ability to Download or Manage/View your certificates...
If you had any changes/updates to your certificates, try Running your app again, and then try editing your Run Scheme again, before going to the hassle of creating a new user account.
If all else fails...
You might then try creating a new user account on your computer, and going through the process of setting that new account up with all the same certificates. But this is more than I want to detail here. I would also advise this as a last resort.
Xcode 10: iPhone has denied the launch request
Good luck!
For Xcode 10.v
1 -> Delete all developer certificates in
keychain
.2 -> Remove AppleID from Xcode.
3 -> Restart Xcode.
4 -> Add a AppleID again to xcode (same as previous is fine).
5 -> Restart Xcode again, (Better if ReStart your MAC).
There's a simple solution.
Change your Bundle Identifier or DisplayName or change them both. When it's working, change it back to what it used to be.
It works for me.
I simply power down my device and started again, boom.....
In my case, projects can't launch on iOS12+ with a specified certificate, but can for other iOS versions.
I have tried above solutions in other comments, but failed. Finally, I found the problem is from the trust setting of certificate in keychain.
My solution:
Hopefully, this can save your time.
The problem should be related with your certificates. Try to resign your certificates and install them on your Mac.
Also, to have a better view of your problem, connect your iPad with iOS 12 and try re-running the application. If the problem persist, you can check the logs to see more details.
On your Xcode, go to Window → Devices → Select your device → View Device Logs.