Distribution Provisioning Profile isn't showing up in Xcode

I'm a newbie to deploying flutter apps to the iOS app store, so bare with me.

Below is a screenshot of Xcode, and it says that it can't find any "iOS Development provisioning profiles." I don't understand why I need one.

The strange thing is that I created a Distribution Profile, so I don't know why that's not showing up here.

When I run the build command from the flutter CLI this is what I get:

I find this all very confusing and frustrating. If anyone could help that would be great. Also if anyone needs more info about my setup just ask. I'm not sure what info is helpful and what isn't.

Answered by tyler_petrov in 766938022

After some digging, I found the problem!

For future visitors with the same problem, I'll document my solution.

There are a few different things you need:

  1. A Provisioning Profile for "App Store" distribution
  2. A Distribution Certificate

First open the Keychain Access application on your mac. After it opens, click "Keychain Access" in the top left corner of your screen. Click "Certificate Assistant", then click "Request a Certificate from a Certificate Authority". Enter your Apple Id email, and select "Save to disk", then click continue.

This is the part that confused me. Next you need to create a Distribution Certificate. Navigate to your Certificates List, and click the + icon. Under "Software", select "App Distribution". Here is where you upload the Certificate Signing Request that we made in the last step. Click "Continue", and then click "Download" on the next page. As I understand it, this will download your certificate that's been signed by Apple.

After your certificate is downloaded, double click it in finder. This will install it in the "Keychain Access" app.

Next we need to create a Provisioning Profile. Navigate to your Profiles List, and click the + icon. On the next page, under "Distribution", select "App Store". Select your App Id from the dropdown, and continue to the next page. This is where you should see the certificate you created in the last few steps. On the next page, download the Provisioning Profile.

In Xcode, under your project, then under "Signing & Capabilities" make sure that "Automatically Manage Signing" is unchecked. The "Profile" field should now be a dropdown. Click it, and at the bottom there's an option called "Import Profile". Click this, and find the profile you downloaded from the last step.

If you fallowed all the steps, and nothings been changed since I had this issue, you should be up and running!

If at any point something isn't working, just Quit out of the app, and restart it. Xcode and Keychain Access aren't too good at updating their lists on the fly.

Also if you get the error that your certificate isn't a part of your profile, then open Keychain Access, and go to it's settings page (command + ,). Click "Reset Default Keychains". This will clear all your keys stored on your mac, so if you have keys used for something else, then export them, and reimport them after you clear the other keys. After resetting the keys, you might need to run through the previous steps again.

Soli Deo Gloria

After a bit more digging, I found this answer on StackOverflow, but it doesn't answer my question all the way. I don't have an iPhone, so that's why I can't use the Development provisioning profile. My understanding is that wouldn't help anyway for uploading an app to the Apple App Store anyway. I get "Provisioning profile 'your profile name' doesn't include signing certificate 'your certificate name'" in Xcode now.

Accepted Answer

After some digging, I found the problem!

For future visitors with the same problem, I'll document my solution.

There are a few different things you need:

  1. A Provisioning Profile for "App Store" distribution
  2. A Distribution Certificate

First open the Keychain Access application on your mac. After it opens, click "Keychain Access" in the top left corner of your screen. Click "Certificate Assistant", then click "Request a Certificate from a Certificate Authority". Enter your Apple Id email, and select "Save to disk", then click continue.

This is the part that confused me. Next you need to create a Distribution Certificate. Navigate to your Certificates List, and click the + icon. Under "Software", select "App Distribution". Here is where you upload the Certificate Signing Request that we made in the last step. Click "Continue", and then click "Download" on the next page. As I understand it, this will download your certificate that's been signed by Apple.

After your certificate is downloaded, double click it in finder. This will install it in the "Keychain Access" app.

Next we need to create a Provisioning Profile. Navigate to your Profiles List, and click the + icon. On the next page, under "Distribution", select "App Store". Select your App Id from the dropdown, and continue to the next page. This is where you should see the certificate you created in the last few steps. On the next page, download the Provisioning Profile.

In Xcode, under your project, then under "Signing & Capabilities" make sure that "Automatically Manage Signing" is unchecked. The "Profile" field should now be a dropdown. Click it, and at the bottom there's an option called "Import Profile". Click this, and find the profile you downloaded from the last step.

If you fallowed all the steps, and nothings been changed since I had this issue, you should be up and running!

If at any point something isn't working, just Quit out of the app, and restart it. Xcode and Keychain Access aren't too good at updating their lists on the fly.

Also if you get the error that your certificate isn't a part of your profile, then open Keychain Access, and go to it's settings page (command + ,). Click "Reset Default Keychains". This will clear all your keys stored on your mac, so if you have keys used for something else, then export them, and reimport them after you clear the other keys. After resetting the keys, you might need to run through the previous steps again.

Soli Deo Gloria

This was helpful. I am also an iOS app development newbie.

One glitch I had was it didn't recognize the Signing Certificate. I had to create the signing certificate through XCode, and then everything worked well.

Can you tell me how you created your signing certificate through xCode? I am having the Signing Certificate not included in Apple Distribution error also!

Distribution Provisioning Profile isn't showing up in Xcode
 
 
Q