Expiring Enterprise Distribution Profile Cannot Be Renewed - xcode

On the Organizer Library we have the list of Provisioning Profiles. Here I have a my enterprise distribution profile that is about to expire (2 days) And it has a button that says "Renew" next to it.
When I click on the button, I get the next Error Message:
The given provisioning profile has no associated devices and cannot be renewed.
Please add devices to your provisioning profile before attempting to renew “enterprise”, or create a new provisioning profile.
I have tried to add random devices to the profile by right clicking on them and selecting "Add Device to Provisional Portal", but it doesn't seem to work. It just adds the device on the Developer iOS Provisioning Portal Devices list. But the profile associated to this device its not my distribution profile, it's one called:
iOS Team Provisioning Profile:* Xcode: iOS Wildcard AppID
And I cannot modify it through the ADP to change the profile. But I don't think that is the answer.
Now, the thing is that I have about 1 thousand users and I would prefer not to create a new profile to recompile my apps and then ask them to download them again.
Is there a way I can renew this profile without all the pain?

The error you are getting can be misleading "The given provisioning profile has no associated devices and cannot be renewed. " With enterprise profile you need to add device only for Developer Profile not for Distribution. This is why you do not have a device limitation with distribution. I do not think expiring profile will affect existing user who uses your application currently but anyway you have to renew your profile in the end. My suggestion will be deleting and recreating it.

Related

macOS App manually signing with provisioning profile for App Store got error Code signature invalid

I try to use manual signing in macOS using provisioning profile. But everytime I try to run it will crash with error
EXC_CRASH (Code Signature Invalid)
If I try to use automatically manage signing or manually manage signing but without provisioning profile it works fine. What is wrong with my provisioning profile? I need to use manual manage signing because my app actually is Xamarin.mac which is not possible in VS for Mac to sign automatically or sign manually without provisioning profile. I am not using weird entitlement. I only need app sandbox to release app store so in my provisioning profile I don't add any capabilities
If your signature is invalid it is likely that you haven't created the correct type of certificate. There are several certificate types that can be instanced and your app will not build correctly if you have created the wrong certificate type.
Common certificate types include:
iOS development
iOS distribution
Mac app development
Mac app distribution
Mac installer distribution
Developer ID application
Developer ID installer
For more information about manually creating your certificate, see my answer to this question: macOS installer certificate evaluation error in Keychain: Invalid Extended Key Usage
Also note that during development you would use an iOS development certificate, but for uploading to the App Store via iTunes connect, you will need an iOS distribution certificate and it needs to be enabled on an Apple ID that has paid for iOS distribution. For more information on enrollment to the Apple developer program, which will enable you with privileges to get a valid distribution certificate see here: https://developer.apple.com/support/enrollment/
If you are sure that it is not a problem with the certificate itself, do note that there other parameters involved when creating a provisioning profile manually - it's not just a certificate + private key. This is a profile that needs to be created in the Apple developer portal, but as long as you have a valid Apple ID to use for creating the provisioning profile it shouldn't be difficult. There are detailed instructions here: https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/manual-provisioning but allow me to paraphrase:
1) Go to the Apple Developers Member Center (https://developer.apple.com/membercenter/index.action), and under the section Certificates, Identifiers & Profiles select "Provisioning Profiles".
2) Click the + button, in the top right corner to create a new profile.
3) From the Development section, select the radio button next to iOS App Development, and press Continue:
4) From the dropdown menu, select the App ID that to use
5) Select the Certificate(s) to include in the provisioning profile, and press Continue
6) Select all the devices that the app will be installed on, this will be all the devices and computers that belong to your Apple ID that will get a distribution certificate installed on it.
7) Provide the Provisioning Profile with an identifiable a name, and press Continue to create the profile
8) Press "Download" to download the provisioning profile onto a Mac
9) Double-click on the file to install the provisioning profile in Xcode. Note that Xcode might not show any visual clues that it has installed the profile except for opening. This can be verified by browsing to Xcode > Preferences > Accounts. Select your Apple ID and click "View Details..." Your new provisioning profile should be listed, as illustrated below:
After the provisioning profile has been successfully created it may be necessary to restart Xcode so that all the development certificates are correctly loaded and available for use.
Checklist:
Is my code signing certificate the correct type
Was my provisioning profile properly registered in the Apple Developer portal (https://developer.apple.com) for the Apple ID that is used on the machine building the app
Is my Apple ID correctly enrolled in the Apple Developer program with no outstanding fees to be paid, or licenses like EULA to accept.
Have I downloaded my provisioning profile from my Apple Developer portal and correctly installed it on my machine that is trying to build / release the app.
NOTE:
In order to distribute apps to the app store there is no choice but to create and pay for the provisioning profile within the developer portal, and install it on your machine by downloading it from Apple.
Best of luck!

Creating a provisioning profile and signing it

When trying to archive, Xcode throws lots of errors.
Failed to create provisioning profile.
It also complains about no registered devices:
There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it.
And some more errors related to provisioning profiles:
No profiles for 'com.Tom-s-Creations.Bouncy-Heavens' were found
Xcode couldn't find any iOS App Development provisioning profiles
matching 'com.Tom-s-Creations.Bouncy-Heavens'.
I'm new to Xcode code signing and would like some help. How would I go about this issue?
First solution:
You have to create a profile on the apple developer website.
https://developer.apple.com
There you can you also register devices for the development.
You can set the provisioning profile in Xcode on the signing area below the team.
Second Solution:
You can also enable automatic signing in the signing area. Selet "your name" (Personal Team)
So no signing is required. This has the disadvantage that you can only use the simulator. If you need real hardware for development and testing you have to sign.

Receiving Error on Xcode: "An administrator must request identities before they can be downloaded."

So I am using Xcode 5 to publish my first app on the App Store, but for some reason it is saying that I must request identities before they can be downloaded. Well, I am the administrator and I searched online for 3 hours looking for a solution. I did possibly EVERYTHING on Google, Youtube, and even StackOverflow. I am just hoping now that I will get a renewed answer.
Try following these instructions. You need to generate a Distribution Certificate, use that certificate to create an Ad Hoc or Distribution Provisioning Profile, download and import that profile into Xcode, Archive your app, and validate it.
https://developer.apple.com/library/IOs/documentation/IDEs/Conceptual/AppDistributionGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40012582-CH1-SW1
http://anthonytietjen.blogspot.com/2012/08/overcoming-trouble-validating-your.html
Also, go into Build Settings for your project and go to Code Signing. Make sure the Code Signing Identities are all set to the iDevice Distribution App ID you created in iTunes Connect as well as the Provisioning Profile set to the Provisioning Profile you painstakingly created in the iOS Development Center as well (that Ad Hoc provisioning profile file you created and downloaded into Xcode.)
I would say that if you still can't get it working with an Ad Hoc provisioning profile, try generating an App Store Distribution Provisioning Profile within the "Certificates, Identifiers, and Profiles" portion of the Development center , import it into Xcode (by refreshing the provisioning profile list under Xcode->preferences->accounts->details->refresh button) and go through the validation process of your archive again. I'm not sure if it's because Xcode can't validate an Archive with an Ad Hoc profile or what, but it seems to pick up the Distribution Provisioning Profile just fine and allows you to validate. Don't worry, even if you don't validate the archive with the Ad Hoc provisioning profile, you can still create the .ipa for your archive by hitting the Distribute button in Organizer->Archives and choosing the Ad Hoc profile so that you can beta test it.
Also one other reason for this which I faced was that I had renamed the project since I first started it. The CFBundleIdentifier was set to com.ABC.${PRODUCT_NAME:rfc1034identifier}. Turns out that the ${..} was evaluating to not my current project(renamed) name when I was trying to validate gave the the same No identities… message. Changed this entry to com.ABC.my-new-project. Rebuilt the archive which now I could validate.
So watch out for project renames.

Why are users disabled in the Build Permissions list and how can I enable them for distribution of my TestFlight app?

When I get ready to send out my IPA through TestFlight, I reach the Build Permissions list as expected. This is the screen that has usernames for you to choose for distribution.
Some of those names are grayed out and I cannot select them. I'm pretty sure they're in my provisioning profile and that I've uploaded their UDID.
How do I enable them?
Edit: alternately, I've heard that it's possible to superimpose a provisioning profile/distribution list after an app has been distributed. Since I just want to get my app out to my testers ASAP, is that an option here for sending the app to the disabled folks? Would everyone get spammed a second time, in that case?
Your provisioning profile has a list of devices associated with it. TestFlight grays out team members who don't have a device that's part of that list. This means, in the iOS Dev Center, you need to update your provisioning profile's list of devices (just check that entry) or even add the device to your dev account's master device list if needed.
Also, super-imposing a provisioning profile via TestFlight has never worked for me to update the original device list in the profile.

App profile needs to be renewed?

I just clicked on Organiser in XCode (I'm running latest publicly available version), and I noticed on one of my apps profiles it says "renew" so I click on that and I get an error msg, saying..
The given profile was not found on the provisioning portal.
Please refresh your provisioning profiles before attempting to renew
“AppProfile"
I don't understand any of that. So...
1) What is it asking me to renew? a development profile? do I need to renew developer profiles? what happens if I don't?
2) Why am I getting an error? what does it mean by "refresh my provisioning profiles" ?
3) Do I have to do this (whatever this is and however I have to fix it) for all profiles? development and distribution?
well i dont know if you have found an answer or not but here is my answer.
you need a valid developer and also distribution profile ( i am sure you are aware of this already) to upload your app. if your app is uploaded and is in the app store you still have maintain a valid developer profile in order for your app to stay in the app store. otherwise they will bring it down.
the fact that it asks you to refresh your developer profile is related to the new system of developer profiles that all of a sudden got introduced. there is no need of renewing your profiles every 3 months anymore. your profiles are good for a year. you have to go to organizer in xcode and select all the profiles you have in there. delete them and then go to your team or your own name on the right pane and there you find the refresh button down at the bottom of the window. when you use that it resyncs your profiles with the developer site.
yes you may have to do that for all of your profiles if you have not done that in past three months.
i hope you find my answer useful.
Edit:
Just go to the developers site and revoke the ones that are about to expire or already expired. Then remove them from keychain and xcode also. Then in keychain create a new certificate request and on the Dev site create new profiles. After creating the new ones download them so they can synch with keychain. After that go the organizer and refresh. Xcode will synch with developer site and will download the new ones. Make sure you connect your test devices so the new profiles can be updated as well. That should do the trick.

Resources