iOS 12 iPad Denied Launch Request - Xcode

我怕爱的太早我们不能终老 提交于 2019-11-27 07:38:28
Wangdu Lin

Haozes: I fixed it by doing this:

  1. Open Edit Scheme
  2. Open Info tab
  3. Executable then select Ask on launch 

Thank god!

Reference: https://forums.developer.apple.com/thread/86729#270356

Linh Vo

It took me three days to solve problem. I found two solutions. You can choose either of the two ways.

Solution 1:

Open System PreferencesUsers & GroupsAdd a user account (build with new user is successfully).

Solution 2: open Keychain Access -> choose System, All Items -> delete certificate Apple Worldwide Developer Relations Certification Authority.

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).

Shane McCurdy

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 ProductSchemeEdit 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!

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:

  1. Delete the old certification in keychain-> system -> all items -> your project related certificates
  2. Reinstall certificates
  3. Restart Xcode

Hopefully, this can save your time.

Binshad

This issue can be resolved by unchecking Debug executable in Edit Scheme.

IceMan

Editing the ProductSchemeEdit SchemeInfo → *Executable** to change to Ask on Launch worked. However, when resetting the scheme to its original setting, the application did not launch.

Searching for a more permanent solution, I removed the developer certificate as described above (solution 2: open Keychain Access → choose System, All Items → delete certificate Apple Worldwide Developer Relations Certification Authority**), but when I relaunched Xcode my application would not launch on the device with exactly the same behavior.

The following approach appears to have resolved the issue:

  1. Removing the Apple ID from Xcode Preferences;
  2. Relaunch Xcode to add Apple ID;
  3. Add a new iOS Development Certificate in Xcode PreferencesAccountsApple IDs using the Manage Certificates button;
  4. Quit Xcode;
  5. Relaunch Xcode and the application.

Here’s a solution that doesn’t involve editing the scheme and therefore makes possible to use the breakpoints as usual.

Looking in the Keychain access, searching for the keyword "developer" I found out that my iPhone certificate was flagged as "invalid" in red. So here's what I've done:

  1. I opened Keychain access and searched for the keyword "developer".
  2. I deleted the "iPhone Developer" certificate (if you have a problem with another device make sure to delete the right one).
  3. Then I deleted the "Apple Worldwide Developer Relations Certification Authority" and the "Developer ID Certification Authority" too.

After that everything worked as usual and I have been able to launch the app on my iPhone.

There’s also a video on YouTube showing this method.

Another possible solution: simply power down your device, and start it up again. Build to the device again.

JESERRANO

After days of research and thanks for the help @Little Green Viper, I found a solution.

Basically, some Apple Worldwide Developer Relations Certification Authority weren't working after the update, but it was able to compile successful for the iOS 11. Then, the most risky solution is deleting all the Apple Worldwide Developer Certificates, BUT before doing that, try creating a new user on your Mac.

(System PreferencesUsers and groupsNew User) that should work.

Now you have to options, work in the new user or re-sign the certificates. In my personal case, I picked up the first option.

HHD

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.

In my case the developer account was not yet approved of on the iOS device. I had to do this manually in the Settings app:

  • Open the Settings app
  • Go to General
  • Go to Profiles & Device Management
  • Choose the profile profile in question and trust it

Something that worked for me was to:

  • check the "Automatically manage signing"

That way I could make it work

That tells me tha maybe the error is somewhere in the provisioning profile.

I simply power down my device and started again, boom.....

I got stuck in this issue for a couple of days. I tried everything I read here but with no success. I remembered that I logged in on another two Macs with my AppleID to download some apps. I logged out of those Macs, signed in with another AppleID and downloaded something on them (I did this because I bought and downloaded a Mac App on those Macs).

It fixed my issue. Hope it helps.

MrMins

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 WindowDevicesSelect your deviceView Device Logs.

LaoTzu78

I also suffered the same issues with iOS 12 and Xcode 10 yesterday. I solved it by setting "Always Embed Swift Standard Libraries" to Yes.

In Xcode, choose TargetBuild SettingsAlways Embed Swift Standard Libraries, and set the value to Yes.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!