How to get add certificate in provisioning profile in company account - xcode

I worked for a company, and my company has a apple company account and one person used to maintain provisioning profile and certificated for all the developers. I created a new certificate through xcode using my apple id provided my company which is linked to company apple account. After creating account all provisioning profiles validate again so that they have all newly crated certificate.
But still xcode giving me error 'certificate doesn't have provisions profile'. Now i am not sure what else to do. That guy has no clue why it is happening. Does he need to click somewhere in company account to get the certificate validated for the provisioning profile.

If you are you using xcode 8 just check Automatically manage signing and select you team xcode will do it. Otherwise create/edit your desire Provisioning Profile and select all available certificate and download and double tap that Provisioning Profile to run on you mac.

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!

Xcode does not show all my teams

Here is what I see at Xcode -> Preferences -> Accounts:
Here is what I see at developer.apple.com -> Certificates, Identifiers & ProfilesWill:
However, according to iTunesConnect I am on another team:
How I got into this situation:
I have previously used my account to upload and release software to iTunesConnect
The admin for Kim Rubin has not made any changes to my access level in the meantime
I have purchased a new MacBook (now regretting) and allowed Xcode to create a new certificate (always clicking whatever the default Xcode response was)
Please explain why Xcode does not recognize my other team membership.
Downstream this is also causing other problems. (Specifically, I cannot upload to iTC because Xcode is trying to sign with the wrong team.) But right now I am only asking about the root cause above.
I tried to get more information in my comments, but without more information, I can explain what I think is happening. You state that your access hasn't changed, but you previously used the account to upload and submit the app through iTunes Connect. You never mention that you used your account to actually build and sign the application that you submitted. I'm guessing you either did not, or if you did it was using manual signing and the old Mac had the iOS distribution code signing identity on it.
It appears you have been granted an iTunes Connect role, but not Apple Developer role. In order to have the team show up in Xcode and allow for things like creation of a certificate / profile, you need to be at least an Admin role on the developer account. When you clicked "Fixed issue" in Xcode, because you only had your personal dev account available, Xcode tried to create a cert and profile on your new account. That will result in a build that was improperly signed, as you need it to be signed with the correct account's certificate and profile.
You can either have the owner of the account add you as a development team admin, or you can have someone on the team send you the iOS distribution certificate and provisioning profile.
In case of my team member who's role was "Customer Support", changing the role to "Developer" was not enough. The solution was to delete his account and recreate it with "Developer" role in Itunes Connect, and only after accepting new invitation the team was showing up in Xcode.

Xcode 8.3.2 signing errors

I have Xcode 8.3.2 on Sierra. I am trying to build an Enterprise .ipa (have Enterprise membership).
I am having issues signing my app. Specifically in Xcode I have the following under General\Signing:
Automatically manage signing is enabled
Team: "My Team (Enterprise)"
Provisioning Profile: Xcode Managed Profile
Signing Certificate: iOS Developer
Status
Failed to create provisioning profile "com.myapp" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
No profiles for 'com.myapp' were found. Xcode couldn't find a provisioning profile matching 'com.myapp'.
My steps were:
Logged into Enterprise account at https://developer.apple.com/account/
Under Certificates, Identifiers, and Profiles I selected the Add
Selected In-House and Ad Hoc
On my MAC in the Keychain Access I selected KeyChain Access\Certificate Assistant\Request a Certificate from a Certificate Authority
Saved to my desktop
In https://developer.apple.com/account/ I uploaded the certificate signing request
I see it as a certificate as type iOS Distribution with and expiration date
I download the .cer file and double click on it to install it
Within Xcode\Preferences I find the Team under the Apple ID and under Manage Certificates I see iOS Distribution Certificates and Enterprise with today's date
I select the Download All Profiles for that team
In Xcode I select General\Signing and "My Team (Enterprise)
At this point I get the two errors described above.
I am new to Xcode development so I am sure there is something wrong with my steps.
Any insight would be greatly appreciated.
Well the solution to my issue was to do the following:
In Xcode under the "General" tab to disable Automatically manage signing
At https://developer.apple.com/account in my enterprise account under provisioning profiles I created a new distribution profile
Downloaded the profile => .mobileprovision file
Double clicked on the .mobileprovision file
With Automatically manage signing disabled I then selected the Provisioning Profile I just created and downloaded in the drop downs for Signing (Debug) and Signing (Release)
At this point I was able to archive and export an enterprise .ipa
This is the solution to my issue that's similar to this one:
Change your bundle identifier to a unique string to try again.
Your bundle identifier is already in use by other developers I guess, so just change your bundle identifier in the Identify tab right above your Signing tab to another one:
For example:
Bundle Identifier: org.react.native.example.RamenForLifeIn2022
Hope this helps :)

Provisioning Profile 'Valid signing identity not found' error

I have an app that is ready for testing on my iPad, and I've created a development provisioning profile, matched up the bundleID and lowered the iOS deployment target.
However when I downloaded the profile and dragged it into the organizer, it says 'Valid signing identity not found'. I'm pretty sure this has got to do with the certificates in the keychain and private keys (???) however I have no idea how to fix this problem.
Can someone please point me to a tutorial or give me some advice on adding certificates into the keychain without using Xcode; stuff like the 'use for development' button isn't working for me!
Note:
The only valid Provisioning Profiles are distribution.
When I try to click 'Renew' Xcode says 'No value was provided for the parameter 'CertificateIDs'. I hope this helps!
The .p12 file associated with your provisioning profile is not found in your system keychain.
Check the below few things!
Make sure you have enabled the correct certificate while generating the provisioning profile in the apple developer site.
Check if you have any duplicates of the your certificate & private key more than once in your keychain access.
If you do not have the .p12 corresponding to the provisioning profile, Get it exported from the mac system on which it was created & install it in your mac system.
Check your code signing identity set your profile there.
and your Provisioning profile bundle id is same as your app bundle identifier.
To do a valid code-signing - without using XCode - you need a valid certificate and key, corresponding to the provisioning profile :
check with Keychain Access that you indeed have a 'iPhone distribution' certificate, with its own private key.
Make sure this is the same certificate that was used on 'provisioning portal' to create you developement / distribution profile. If not, create a new one, or import the certificate from the other Mac you used when you created the provisioning
Download the provisioning profile, and just double-click it.
Posting this here because none of the other answers really went into enough detail to help me and I still had to figure it out on my own.
On the apple developer website, log in and under certificates click 'All'. The certificate needs to be generated on YOUR machine and with YOUR account or things do not build. This is what confused me... You can click the + icon and make a new certificate (development, or distribution). If it does not let you select for example Distribution, it's because there are already too many certificates in the account. So first, you have to delete an older certificate.
1) Delete the oldest certificate in the portal
2) Click the + and create a new certificate -- this will guide you through opening Keychain Access on your machine and requesting a certificate from apple, and you will have to save a file and upload it to the developer portal to create the certificate.
3) Download the new certificate and it will add to Keychain access
4) Go back to provisioning profiles on dev portal, click EDIT on the one you are trying to use and change it to use the newly generated certificate.
5) Download and click the provisioning profile
6) Everything works great.
This process actually was not that difficult, but for some reason I could not find the correct explanation anywhere. I hope this will help someone.
I had the same issue. I did have all the private keys and everything was correct, but xcode refused to build and kept saying that I didn't have a valid provisioning profile and organiser showed 'valid signing identity not found'.
The solution involved:
revoking my developer certificate and development provisioning profiles from the ios provisioning portal
deleting those certificates from keychain
try building again and tell xcode to 'fix issue'
This lets XCode manage the certificates, and it magically worked.
However on another project I still had the problem, and it was solved by this answer:
https://stackoverflow.com/a/18966088/1192732

Expiring Enterprise Distribution Profile Cannot Be Renewed

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.

Resources