iOS how to add a provisioning profile - ios

I am using Xcode Version 8.3.3 (8E3004b). I have an app developed that I would like to deploy to Apple's App Store.
In order to Archive and deploy, I understand I first need a provisioning profile. So, in the developer console, I set up an iOS Distribution Provisioning Profile.
I also have the following certificates:
On my MacBook, I added the following certificates to the key chain:
Then when I go to Xcode, I would expect to have a Provisioning Profile:
But as you can see, it Failed to create provisioning profile and No profiles for 'com.ionicframework.thewhozoo912107' were found.
I am obviously missing some step in order to create the Provisioning Profile in order to distribute the app to the Apple App Store.
Question
If anyone can suggest what I need to do in order to create a working provisioning profile in order to distribute the app, I would appreciate the help.
More info:

Solution:
I fixed this in Xcode by unchecking Automatically Manage Signing, and then selecting my provisioning profile.

I had that problem as well when I was developing my first app. It took a while, since I managed it. Try to plug your iOS device in your computer and then it should work.

Related

Noob stuck in App Store Distribution upload

I'm a novice Flutter developer. I just completed my first app. I've managed to get it published to the Google Play Store internal testing process. I'm attempting the same for iOS and macOS and TestFlight but I'm getting stuck when I try to upload for Distribution. The error is a mismatch in the code signed versus the provisioning profile. I've retraced and retried my steps multiple times, but I'm stuck.
Anyone willing to help me?
Thanks in advance,
JT
If you get this error, you probably don't have the correct type of Provisioning Profile. There's a few types of Provisioning Profiles, most notably are the "Development" and "Distribution" profiles. I suggest looking at your provisioning profiles, and if necessary recreate them.
To elaborate: You have 1 Certificate (created via Xcode Certificate Generating). With this Certificate, you can create an "App Identifier", and Provisioning Profiles. You can use the same Certificate for both a Developer Provisioning Profile and a Distribution Provisioning Profile. They don't work with one another, meaning a Developer Provisioning Profile won't work for a release build, and a Distribution Provisioning Profile won't work for a debugg build.
Try this, and see if that helps. Be sure to haul the new profiles in Xcode (or any other method you'd use) and edit your project's settings.
Error Code-90161 Invalid provisioning profile

"No matching provisioning profiles" when Submitting App to App Store in XCode 7.3

I have been trying to submit an update to my app in the app store and for the past 12 hours. I keep encountering this message in Xcode 7.3.
I have deleted all distribution provisioning profiles, recreated them, remade my app ids, removed them from xcode, re-downloaded them to xcode etc... I keep getting this message. The app is already in the app store. Any suggestions on what I can try? Building the app is easier then submitting the app. Thanks for any assistance
I have this error before and solved it by simple steps:-
1-xCode->Preferences->Accounts choose your Apple developer account-> View Details> right click on provision profiles and choose show in finder and delete all provision profiles.
2-Remove your Developer account.
3-Remove all Certification from Key Chain access.
4-Restart your Mac.
5-Check your certifications and provision profiles in your Apple Developer Account and be sure its working correct.
6-Open your xCode and add your Developer account and be sure that you download all provision profiles.
7-Restart your Mac and open xCode again and push your App to iTunes Connect.
I hope I help you.
I'm not sure if this is the right way for doing it, but I also had this problem when trying to submit an app with a watch kit component. What I did was create different provisioning profiles for each target.
1) The provisioning profile that you already have for your actual app.
2) Provisioning profile for the WatchKit target.
3) Provisioning profile for the WatchKit Extension.
I added all three of these to the Xcode project and went to the Build Settings tab for each target to set the provisioning profile for each target separately. Then I was able to submit my app without any warnings or errors.
Nothing worked for me except the following simple solution. What resolved the issue was manually setting Provisioning Profile for Debug and Release to the appropriate values, as opposed to choosing Automatic (i.e., set values to your development and distribution provisioning profiles) for each of my targets. I did this for the main app, today extension, watchkit extension and watchkit app. After that all works as expected. Thanks for everybody's contribution.

iOS: Production Provisioning Profile has no devices included

I recently decided to add Push Notifications to my iOS App. I had to create new certificates, then I realised the devices included in the Apple Developer Website weren't up to date. So I had to add my new device with the correct UDID. That's where the issues started. I can't exactly explain all the steps I've taken because I've been constantly deleting and adding new Provisioning Profiles today. Here is the status now:
I have a iOS Team Provisioning Profile, in iOS Development, Managed by xCode, for my app.
Then, I created my own iOS Production App Store Provisioning Profile, but it always indicates that there are "0 devices" linked to the profile. Impossible to add a device. This obviously creates issues in xCode, because whenever I try to generate new archives, or builds, I'll get issues that my device is not included in the provisioning file.
I've tried deleting them all and recreating them multiple times to no avail.
Whenever I let xCode try to fix the issue, it ends up with the Provisioning Profile in Build Settings being switched to Automatic, and the Code Signing Identities ALL switch to "iOS Developer". But that obviously fails when I try to build a Release build of my app.
From scratch, what are the steps to generate a valid iOS Distribution Profile for my app, that includes my device, and that I can use for Push Notifications?
EDIT: I now understand that I can't add a Device to a Distribution Profile and that this is not necessary. Thanks a lot. Still, I get the following message whenever I try to build on my device:
Your build settings specify a provisioning profile with the UUID “...”, however, no such provisioning profile was found.
Xcode can attempt to fix this issue. This will reset your code signing and provisioning settings to recommended values and resolve issues with signing identities and provisioning profiles.
ANd when I click on fix, it switches back to everything I explained above.

XCode 6 and Ad-Hoc distribution without XC: provisioning

Yesterday I've downloaded Xcode 6 and now I have got a problem I can't solve. In my member center I've got valid certificate and ad-hoc provisioning (distribution). Till yesterday, in Xcode 5 if I wanted to add my .ipa to TestFlight I was using Archive and selecting my valid ad-hoc profile. I wasn't even logged in in my developer account in Xcode.
Now - in Xcode 6 - nothing is working at all. Ok, I've logged in preferences, Xcode downloaded all my provisionings on Mac, but whenever I choose Export it says that I don't have matching provisioning profile and it's creating new provisioning profile with XC: prefix - which I don't want to use, because it contains all devices I have in member center - even those I don't want to include in my app!
I was trying everything from this threads:
Xcode 6 - How to pick signing certificate/provisioning profile for Ad-Hoc distribution?
Xcode 6 GM creating archive
but nothing is working for me. Maybe I don't understand correctly how it works and there is a trick I have to do but I would like to use provisioning profile defined by me. I was trying to create new provisioning profile, rename the old one, remove all from Mac, drag provisioing profile from desktop to Xcode icon, select correct Provisioning Profile in Build Setting all over again but I'm stuck.
Screenshots here:
My Ad-hoc profile is distribution profile.
There is no way to get Xcode 6.x to use an ad-hoc profile that doesn't contain all of the devices on your team; this is by design.
I have a workaround for this that works for me.
I have both Xcode 6 and Xcode 5.1.1 installed, Xcode 6 is in Applications and Xcode 5.1.1 is in another directory. When I want to do a build I use Xcode 6 to create the Archive. But you can also see the created Archive in Xcode 5.1.1 so I use Xcode 5.1.1 to distribute the Ad Hoc .ipa using the provisioning profile that I want to use. So build using Xcode 6 but distribute using Xcode 5.1.1. It works for me.
Xcode6 will now always create a new AdHoc provisioning profile prefixed with 'XC' when you export an archive for testing (e.g. Hockey App). In order to do this you must always have the latest App Store Distribution certificate and private key in your keychain.
NOTE: You do not have to have this latest distribution certificate selected in your provisioning profile you built the archive with. Also keep in mind you do not need to have an AdHoc provisioning profile to export an AdHoc ipa.
When you export the first time you will probably receive an error saying that you do not have an AdHoc provisioning profile with the following devices/people in it. Just hit 'Try Again' and it will work.
Something else to keep in mind is that when exporting an ipa you are forced to test push notifications through their distribution/production servers as it is using the new self generated 'Distribution XC: AdHoc' provisioning profile.
If you are using Urban Airship like we are you can no longer use development keys for testing. If you look under 'Entitlements' once you get through the steps to export it will show you that 'aps-environment' is set to 'production'. If anyone finds an alternate solution for this let me know.
I was facing similar issue with my distribution license, and the problem was there was "XC" provisioning profile which had the exact same bundle id.
My solution to his was to delete this XC: provisioning profile both from Apple Developer Portal and Xcode -> Preferences -> Apple ID -> View Details -> XC: provisioning profile -> right click Go To Finder -> delete
Hope this helps,
I encountered the same issue. On one of the StackOverflow threads you linked to, a solution was recently added that worked for me.
After you have created the archive, you can export it with a specific provisioning profile from the command line:
xcodebuild -exportArchive -archivePath "~/Library/Developer/Xcode/Archives/{some-date}/{appname date, time.xcarchive" -exportPath {appname} -exportFormat ipa -exportProvisioningProfile "{provisioning profile name}"
Note that the provisioning profile name is just the name, without any path or file extension.
I ran into this today as well.
I ended up removing the XC profile from the developer portal and recreating my other ad-hoc and app store profiles and downloading them again.
After I did this, when I built and tried to submit to app store, the correct App Store profile showed up AND when I went to export for ad-hoc, the correct ad-hoc profile showed up.
Yay ;)
I hit a similar problem and discovered that even if you specify the correct profiles in Xcode the Xcode6 system wants you to have the latest (from member centre) provisioning profile (for each team your account is against). It seems to walk each one in turn before using the one you need and gets blocked if you are absent any provisioning profile for the teams you belong to.
I ran into this.
No solution here worked.
I ended up moving to a command line build using nomad cli shenzen. Its another great open source project by mattt
Now I go into a shell and just type:
ipa build
DONE
They even have options to send the ipa to whatever Ad Hoc service you want. Awesome.
In Xcode 6 (at least 6.1 I am using now)when you are doing the export for ad hoc, xcode 6 will automatically scan if there is any provisioning profile contains all devices registered in the developer account and at the same time match the bundle ID. If no, it will use XC provision profile. Therefore, if you want to use your own profile, for example, for the purpose of push notification, you will need to select all devices in your profile on apple developer portal. I guess that's the reason why some people recreate profile would work and some wouldn't.
My way is much simpler:
I go to the developer - provisioning profiles and re-create my Ad Hoc profile by choosing 'Edit' then 'Generate', download it and install with double-click. When exporting .ipa the correct (mine) profile is chosen.
Apple only uses the last built provisioning profile, obviously.

Cannot create new provisioning profile from xcode

I was trying to create a new provisioning profile for beta test distribution on an app I'm working on, and I'm running into some difficulties. I believe I have valid certificates available, since I can get apps up and running when they're attached to the development machine. I also have my private key connected to the developer certificate.
The problem is that I cannot create a new provisioning profile from within Xcode. In the organizer, after hitting create profile, no certificates are displayed in the menu. Even if I fill in all the details that I can, I am not allowed to create the profile since there is no certificate to attach to it.
In the Developer Profile tab, I do have both developer and distribution identities. I can also create the provisioning profile from the provisioning portal, which is then picked up by Xcode and automatically downloaded. It would just be nice to be able to complete this task from within Xcode.
Thanks!
Check your keychain for invalid certificates and remove them. Re-download/re-install Apple's WWDR intermediate certificate (available on the provisioning page).
Turns out, installing Xcode 4.3 corrected it. I have no idea what was the cause, but the upgrade fixed the issues so I'm not particularly concerned now.

Resources