2

The Error

You may have seen a question on the cause of this error before:

iPhone has denied the launch request.

Cannot launch app

The error occurs for any Xcode project, so the problem is not related to the project itself.

This is different, and I do not want to use some workaround.

Attempt to solve my problem

I went in my Keychain as it has been a year since I signed up for my Provisional Developer Certificate, which has now expired, so I deleted it:

Keychain - deleting certificate

Quitting Xcode and removing Signing temporarily did not work still.

I then tried to renew the certificate by going to this link on the Apple Developer website, but I got an error:

Error when trying to get certificate

When I click on some pages on the website, I normally have to log in again, but I didn't need to but got the error above.

What can I do?

I am aware that I need a new certificate, even though it still shows I have an iPhone certificate:

Keychain - shows another certificate

What am I able to do so I can launch my project?

Here are my Signing settings:

Provisioning Profile


The Temporary Solution is to disable Debug Executable. However, this means that you cannot get debug logs, which is very important.


As I have heard recently, this appears to be a common bug right now. Many people are experiencing the same issues.

Community
  • 1
  • 1
George
  • 25,988
  • 10
  • 79
  • 133
  • What options do you have for the project target under General settings? Can you have it automatically manage signing and select the team that matches your non-expired certificate? – Phillip Mills Mar 16 '19 at 19:41
  • @PhillipMills I have `Automatically manage signing` on and have selected my profile. – George Mar 16 '19 at 19:44
  • Does the selected profile match the non-expired certificate? – Phillip Mills Mar 16 '19 at 19:48
  • When I do that, it shows me "Xcode Managed Profile" with an information button beside it. If I look in Keychain Access for the certificate that's part of that profile, I see the same one with an expiry date of Nov. 15. (I can tell it's the same one by the code that follows the name.) – Phillip Mills Mar 16 '19 at 20:18
  • @PhillipMills The info button shows it expires in `6 days`, which provisionals normally say. The certificate shows the list of capabilities is the same one in Keychain that expires on `30 December 2019`. – George Mar 16 '19 at 20:23
  • Be careful with terminology: You have a *personal developer certificate* for code signing, and *provisioning profile* (certificate) for running the app on a particular device. – marko Mar 18 '19 at 21:07
  • @marko I believe I am talking about the `provisioning profile certificate` as I get this issue when running it on my own device. – George Mar 18 '19 at 21:13
  • Same issue as https://stackoverflow.com/questions/55132628/provisioning-profile-doesnt-include-the-application-identifier-and-keychain-acc You just have to wait for Apple to fix this – matt Mar 19 '19 at 09:51
  • @George_E Do you have enabled 'Always Trust' setting in 'Trust' section your certificate in Keychain? – kamwysoc Mar 19 '19 at 10:09
  • @kamwysoc It was on the default, but even that didn't help. – George Mar 19 '19 at 16:37
  • From what I know when it's set to Always Trust it brakes code signing process, but if you have default then it's probably something different problem – kamwysoc Mar 19 '19 at 16:39
  • @kamwysoc There have been many reports recently suggesting that this is a bug (see bottom of question). – George Mar 19 '19 at 16:40

3 Answers3

2

I was experiencing this issue for the past week, and today it seems Apple has resolved it.

The .mobileprovision file now has the get-task-allow property set to true, and it's working for me again. I performed the following steps, and everything now seems back to normal:

  1. Uncheck the Automatically manage signing option in the General tab of target settings
  2. Exit Xcode
  3. Delete *.mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/
  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. Re-launch Xcode and reenable Automatically manage signing

I don't need to utilize any of the workarounds that have been floating around. Debug executable is on in my scheme and Ask on Launch is not selected.

chainsawsalad
  • 136
  • 1
  • 7
0

It may be code sign issue. Make sure you're signing with developer, not distribution. still if it does not works, still there are two solutions.

  • Solution 1: open System Prefrences -> Users & Groups -> Add 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

Faiz Fareed
  • 1,498
  • 1
  • 14
  • 31
  • there are two types of provisioning profiles, development and distribution, and you should sign both, and then simply unplug device, then create adhoc distribution profile for your app and in that don't forget to add your current device as reference when generating that profile. download that profile, exit Xcode completely and the double click at that profile and after that plug your device and then try to play the app on device. – Faiz Fareed Mar 18 '19 at 20:15
  • I have added what my `Provisioning Profile` looked like in my `Signing` settings in my question. What can I do then? – George Mar 18 '19 at 20:50
  • Basically, some Apple Worldwide Developer Relations Certification Authority weren't working after the update, but were able to compile successful for the iOS 11. Then, the most risky solution is deleting all the Apple Worldwide Developer Certificates, BUT before to do that, try creating a new user on your Mac (System Preferences > Users and groups > New 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. – Faiz Fareed Mar 18 '19 at 21:01
  • Unfortunately, solution 2 where I deleted the certificate again did not work. And I really do not want to create a new user, and set everything up again :( – George Mar 18 '19 at 21:09
  • Have you tried this Edit Scheme -> Info -> Executable -> Ask on launch https://upload-images.jianshu.io/upload_images/663014-d5d182e310052664.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240 – Faiz Fareed Mar 18 '19 at 21:22
  • Yeah, don't want those workarounds, I just wanted it like before it all messed up. It's a temporary solution, but doesn't provide debug information that way either. – George Mar 18 '19 at 21:24
  • I don't think so. but y you don't try new user? just for testing purpose. after that you can also delete new user account. in your Mac (System Preferences > Users and groups > New User ) – Faiz Fareed Mar 18 '19 at 21:46
  • All the stuff is set up locally - this new account can’t access it, and I don’t want to move everything around – George Mar 18 '19 at 21:54
  • It turns out that this is some sort of bug, hopefully Apple fixes it soon so we can find a solution. – George Mar 18 '19 at 23:20
0

I have faced the same issue earlier.

You can fix an issue by enabling two-factor authentication if you are the independent developer.

Enrolling as an Individual

If you are an individual or sole proprietor/single person business, get started by signing in with your Apple ID with two-factor authentication turned on. You’ll need to provide basic personal information, including your legal name and address.

Enrolling as an Organization

If you’re enrolling your organization, you’ll need an Apple ID with two-factor authentication turned on, as well as the following to get started: A D-U-N-S® Number

Your organization must have a D-U-N-S Number so that we can verify your organization’s identity and legal entity status. These unique nine-digit numbers are assigned by Dun & Bradstreet and are widely used as standard business identifiers. You can check to see if your organization already has a D-U-N-S Number and request one if necessary. They are free in most jurisdictions. Learn more Legal Entity Status

Your organization must be a legal entity so that it can enter into contracts with Apple. We do not accept DBAs, fictitious businesses, trade names, or branches. Legal Binding Authority

As the person enrolling your organization in the Apple Developer Program, you must have the legal authority to bind your organization to legal agreements. You must be the organization’s owner/founder, executive team member, senior project lead, or have legal authority granted to you by a senior employee. A Website

Your organization’s website must be publicly available and the domain name must be associated with your organization.

Reference: https://developer.apple.com/programs/enroll/

You can start enrollment by using the below reference: Start Your Enrollment if pending

After complete enrollment process successfully then download new certificate if required or go with automatically manage signing.

Enrollment Support

Thanks

Hitesh Surani
  • 12,733
  • 6
  • 54
  • 65
  • I'm not looking for enrollment into a paid membership. I am using a **free** provisional. I have also had `2FA` on even before it was required. – George Mar 19 '19 at 16:39