App profile needs to be renewed? - xcode

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.

Related

How to repair Xcode 11 managed profiles?

My distribution certificate was due to expire soon, so I went ahead and created a new one and revoked the soon to be expired.
I noticed that Xcode was not recreating the provisioning profiles automatically, when clicking on the info button besides the Provisioning Profile Xcode Managed Profile I saw a provisioning profile created with the last certificate even though it was already revoked.
I tried signing out and in to my developer account in Xcode preferences.
I tried deleting all provisioning profiles on my apple developer account.
I tried deselecting and reselecting the Automatically manage signing checkbox on the target.
All of the above did not worked.
The only thing that worked was to add a new app capability. I added a new group identifier to the App Groups capability, waited for the repair message and then removed it again.
Hope this helps.

Xcode 8: Your account does not have sufficient permissions to modify containers

I'm getting this error with code signing with Xcode 8:
Your account does not have sufficient permissions to modify containers
What does it want from me?
I also faced this issue in XCode 8.3.3 (8E3004b). I just went to Project Settings → Capabilities tab, then toggled iCloud off and on. Once I went back to the General tab, the errors were gone.
This seems like it may be a bug with XCode 8.
To resolve this, I unchecked the "automatically manage signing" checkbox in the of my target's General settings. I then archived my project by manually setting the provisioning profiles. After that succeeded, I went back and again checked the "automatically manage signing" checkbox and it stopped complaining with errors that made no sense.
Just had this issue with XCode 8.3.2 after we enabled iCloud Capabilities and the entitlements changed. We use automatic signing - xcode managed profile. Going into Xcode -> Preferences -> Download All Profiles wouldn't fix the problem UNTIL we temporarily made team members Admin and repeated the process. At that point XCode realized the new provisioning profile and the problem was solved.
Just goto Xcode capabilities section and see if any of the capability showing error then disable that and enable again. Then come to your Signing section in General. The issues will go now
1) Remove all automatically created provision profiles from
~/Library/MobileDevice/Provisioning Profiles/
2) In Xcode 11.1 and higher remove and add capabilities
I faced this issue in XCODE Version 8.3.3 (8E3004b). To resolve this go to project settings. In capabilities tab -> iCloud -> containers. Verify whether valid iCloud containers are selected and you have permission to access these containers. This should resolve the issue.
I was having the same problem too after I added a new device with Xcode 8.3.3 (same issue present in Xcode beta 9.0 as well). My Apple Developer account wasn't an administrator at the time either. I tried deleting my provisioning profiles and re-downloading them but that didn't work. I tried manually downloading and installing the provisioning profiles from developer.apple.com, but that didn't work either. I had my Apple Developer account made an Administrator following advice from dchappelle https://stackoverflow.com/a/43812123/5760384 and voila! The provisioning errors went away. (I'd reply to his post, but I don't have enough reputation.)
Full text of error:
Your account does not have sufficient permissions to modify
containers. Provisioning profile "myApp" doesn't include the currently
selected device "myDevice". Code signing is required for product type
'Application' in SDK 10.3
Another potential solution, depending on your needs, is to upgrade to the paid version of the Apple Developer Program; this gives you access to the iCloud container features. Once paid and activated (the membership application takes a few hours to go through if you're an individual... sometimes a few days if you're a business) you'll need to enable iCloud features via the online dashboard or via XCode as per Apple's instructions. You may then have to restart XCode.
I had the same issue with Xcode 9.2. But in my case, the problem was in Keychain: my dev certificate was saved into login keychain by default. I was able to build an app on a device only when I moved it to System keychain.
So the steps are next:
Open Keychain Access
Open login keychain (you can see the list of all keychains on the left top corner of the window)
Drag and drop your dev/distribution certificate into System keychain
You may need to input password.
PS: while doing this steps you also may need to unlock locks on the keychains.
I had this problem and I fixed it by logging in to the iTunes development portal and accepted the new Terms & Conditions. I was basically locked out until these were accepted.
I was getting this error because I was in another team (my university team account), which was severely limiting my access to developer.apple.com features. Once I left that team (I added an answers here because even this was a bit of a pain), I was able to remove & re-add my account to XCode. It then worked.
EDIT: It happened again on a new machine (an M1 mac), and this time I had left the university account. By removing and adding back "Apple Pay" capability in Signing & Capabilities, it immediately fixed itself.
None of the other answers worked for me. E.g. The app doesn't even use iCloud, and enabling-disabling it didn't help. Deleting profiles, revoking certificates, disabling/re-enabling automatically manage signing also didn't help.
Go to Xcode -> preferences -> Accounts.
Remove your Apple ID & login back. Refresh the signing in on your project target
I had the same issue using Xcode 9.3
Solution:
1 - Deselect "Automatic manage signing"
2 - Created a Provisioning profile for dev and dist and added in Keychain.
3 - Again when you come back to Sighing (debug and release) you can see your created provisioning profile in a dropdown
4 - Crate archive by selecting "Generic iOS devices" in the project schema

Your account already has a valid Developer ID Application certificate

The last couple of days I've struggled with code signing my cocoa app in Xcode. I've read through all similar topic that looked to be related, but nothing has helped.
Whenever I try to export my archive I get this error message:
I've tried to delete everything in my keychain and all profiles/certificates that I'm allowed to delete/revoke in the member center. However, I still get the same error with no "Fix" or "Reset" button. How should I proceed in order to get my application signed for distribution outside of store?
Go to Preferences -> Accounts, choose your account, click "View Details" in the bottom right corner and in the dialog click Download all in the bottom left corner.
Also, take a look at fastlane.tools. It is a great set of tools, which is, among other things, capable of dealing with code signing issues. Calling cert and sigh is sometimes enough to deal with many code signing-related problems.
I had installed my Developer ID Application Certificate on a different Mac and was getting the same error as in the question when I tried to use that certificate on a "new" Mac.
This fixed it for me:
I still have the other Mac so I exported the Developer Accounts from that one again:
Go to XCode | Preferences | Accounts
Click the "cog" in the bottom-left-hand-corner next the the plus and minus signs
Click "Export Developer Accounts"
Save the exported file somewhere accessible to your other Mac
Then, on my "new" Mac:
Go to XCode | Preferences | Accounts
Select the Apple ID that represents my dev certs
Click the minus sign in the bottom left hand corner to delete that account
Quit XCode
Open Key Chain Access
Delete all Developer Certificates
Close Keychain Access
Go to XCode | Preferences | Accounts
Click the "cog" in the bottom-left-hand-corner next the the plus and minus signs
Click "Import Developer Accounts"
Select the file exported on the "old" Mac above and import
I'm hitting this same issue.
The error appears to be telling you that valid Developer ID Certs have been created under your developer account, but they are not currently on your Mac, so they cannot be used.
The solution would be to download the Developer ID Cert(s) from the web. However, you likely do not have the Private Key used to sign these certs. So at this point they are rather useless.
In my case, the further problem is that I already have 5 Developer ID Certificates in my account. I'm not quite sure where these came from. They were created years ago, perhaps when I was attempting to create Mac App Store certs? Or perhaps by clicking that damn Fix Issue button...
There appears to be a limit of 5 Developer ID Certificates per developer account, by default.
Developer ID Certificates are created, now, through Xcode rather than via the Members Center:
However, in Xcode, there is no longer a button to "Create" a new cert. The only button is "Reset". This button simply links me back to the Members Center in my web browser, so is completely useless...
Via the Members Center, Developer ID Certificates cannot be revoked, as you would an iOS or Mac App Store certificate. The "Revoke" button is Grayed out.
You can’t revoke Developer ID or Pass Type ID certificates using Member Center. Instead, send a request to Apple at product-security#apple.com to revoke these types of certificates.
Apple will only revoke these certificates in cases of security, to disable installation of the app on all client machines. I've tried emailing the above address, and they told me they could not revoke the cert.
The solution, then, is to have additional Developer ID Certificate slots added to your account, past the limit of 5.
Product Security told me, rather than revoking the certs,
We encourage you to contact Apple Developer Connection at https://developer.apple.com/support/ to resolve the issue you’re experiencing.
I've now contacted developer support. I recommend calling. They are currently, hopefully, setting up new Developer ID slots on my dev account.
When you create a new Developer ID Certificate that you will actually use, be sure to back up the Certificate and Private Key so that you do not hit this issue in the future.
EDIT:
I waited for over a month, I believe, with no response. I happened to have a ticket to an Apple TV Tech Talk and talked to an Apple representative at their lab. He was able to reset my Developer ID Certificate limit in about 5 minutes. So this is possible, but to expedite the process I would attempt to talk with a Developer Evangelist at Apple either in person or over the phone.
One issue could be the private key is missing for your developer cert. With Keychain Access find your developer cert and verify it has a little triangle beside it. Click on the triangle to reveal the private key.
If it's not there you'll need to restore this private key from the Mac you created your certificate.
Otherwise, delete the cert from the Apple Developer website and then create a new one.
Same issue here but i was using "automatically manage settings" on Xcode 8. And for a particular reason there were two distribution certificates in my developer account.
Xcode seems to choose the most recent automatically and I didn't have it installed on my mac. So I switch to the old way by creating manually my app ID and my provisioning profile (which use the appropriate certificate) and it works :)
I had similar issue. I've discovered that my provisioning profile was invalid since I've updated iOS Developer certificate. After PP regeneration everything works as expected.
I ran into this same issue, and I fixed it at last. There are some tips:
in Xcode -> Preferences -> Accounts, click button View Details, then
click button Download All Profiles
in Keychain Access, check if the certificate exists. if not, choose
File->Import items, then choose the .cer file you download
from developer website
Hope it helps.
On Xcode Version 8.3.3 go to Preferences ->Accounts -> Manage Certificates -> then click (+) ->on dropdown menu click iOS Development. Do the same for iOS App Store -> Done -> Download All Profiles.
If you have changed the machine Exporting the developer account from old mac and then importing into new mac solves the problem

xcode organizer refreshing provisioning profiles

I have had a look around and everyone seems to be having loads of different issues with the xcode organizer, but they don't seem to be having the same issue so I can't quite isolate my issue.
The issue I am having is when I go to the organizer and refresh the provisioning profiles it produces a message saying
Sign in with your Apple ID
the username and password I provide are both correct but the window goes away and then immediately returns and doesn't say whether or not I enter correct details (I know they are correct) and it will continue asking me this for as long as it takes to refresh the profiles. This also happens when I select a device to use for development, but the device is never actually added to the team provisioning profile even though it says it has been.
Has anyone any idea how I can stop this?
I guess in your position I would carry out the following checks:
Can you log in to your account on the Provisioning Profile. If
you can then your Apple ID and password must be OK
When in Xcode and responding to the 'sign in' message are you
using the username & password remembered by KeyChain? Are you sure
these are both OK? Maybe enter them manually again to make sure
In Xcode go to the Provisioning Profiles screen in the Organiser
tab and right-click a profile and select 'reveal in Finder'. Does
the folder holding your local copies of provisioning profiles
contain any extra files that might be old/corrupted versions? If so,
delete them, return to Xcode and attempt to refresh again.
If the above three checks don't yield anything useful then I
think it must be something corrupted on the provisioning profile
(such as a provisioning profile or certificate) that needs to be
revoked - letting Xcode create it/them anew for you. Or something
out-of-date or corrupted locally (maybe a public or private key or
certificate in KeychainAccess - a local copy of a provisioning
profile). And you may have to start revoking/deleting digital assets
to get things working again (but only do this if you have no other
choices...)
I once had a horrible issue with an iPhone developer certificate that took ages to fix - but perseverance eventually paid off - good luck!

How do I change teams in Xcode 4.4

In 4.3 and under the first time you tried to do a team based action, such as refresh provisioning profiles, it would ask you to log in. It no longer does this in 4.4, it just assumes a team and refreshes... how do I teach Xcode there are multiple teams? It lists them under the teams in side bar of the organizer, but won't let me refresh their profiles, or select them when creating new profiles.
To clarify, each team is under a different developer ID, and I can't find any way to log in to different developer IDs to refresh the provisioning profiles. I can still log in to different ID's when submitting apps to the app store, however this doesn't seem to affect the provisioning profile refresh login ID.
Seems to be fixed in Xcode 4.4.1 (released yesterday, 7th August 2012).
And as Ivan stated correctly: It seems that all profiles from all teams are synced as long as you have the same apple id across all teams.
(Tested this by removing all profiles from Xcode in the Organizer and hit "Refresh")
Update:
If you have different apple ids across multiple teams and the login dialog is still missing, you might have saved your credentials in your keychain. See comments #2 and #3 of this answer for a workaround.
There is a strange way to add a new identity (user/pass). If you build and archive and then go to Distribute -> Save for Enterprise, then open the Code Signing Identity list there will be an item marked "Refresh code signing identity" at the end. If you select it you'll be prompted to enter username and password. Hope this helps.
For reference, since I found this page searching for XCode 5.1 - getting XCode to sync new teams on the same Apple ID, click 'View Details' on any teams that are there to see the provisioning profiles for that specific team, then hit the refresh icon. It will also download any new teams added to the ID.

Resources