Cannot update provisioning profile - ios

A team member needed to register her device so I added her device to Devices section of Apple Dev Portal. I then created a new ad hoc provisioning profile that includes her device and finally deleted the old provisioning profile. But XCode doesn't seem to see this new provisioning profile:
To ensure that Apple is using the latest profile I did this:
rm -rF /Users/etayluz/Library/MobileDevice/Provisioning\ Profiles/
And when I try to build Xcode errors out:
error: Build input file cannot be found: '~/Library/MobileDevice/Provisioning Profiles/dab00c70-5073-403b-ae60-e337afeee7fc.mobileprovision'
How do I get Xcode to use the new ad hoc provisioning profile?
I also clicked on "Download Manual Profiles" in Preferences->Accounts - and that does fetch the new profile that I've created - but Xcode is being stupid and still demanding to use the older profile. How do I get Xcode to point and start looking for new profile?

Go to ~/Library/MobileDevice/Provisioning\ Profiles/ and delete all the provisioning profiles from there.
Go to XCode > Preferences > Accounts and select the Apple Id.
Click Download All Profiles. And it will download all the provisioning profiles again.

Go to Xcode->Preferences->Accounts
Select the Apple ID and then select the Team which your app is from.
Click on Download Manual profiles
CMD+Shift+K (Clean Project)
Build Project again (CMD + B)

Related

Error "Invalid Provisioning Profile Signature" while trying to distribute a Flutter app in iOS

I’m trying to send my build to the store, but when I'm trying to distribute the app with Xcode, I get this error:
Invalid Provisioning Profile Signature. The provisioning profile included in the bundle 'com.grafenit.velyvelo' (Payload/Runner.app) cannot be used to submit apps to the iOS App Store until it has a valid signature from Apple. For more information, visit the iOS Developer Portal. With error code STATE_ERROR.VALIDATION_ERROR.90165 for id 73638f81-3103-4f98-a8f0-d0dd2a01edcc
How can I fix this?
I faced this issue this morning.
To fix it,
Just get Xcode to re-download the provision profiles by deleting everything here: ~/Library/MobileDevice/Provisioning Profiles
Open Xcode Preferences, navigate to Accounts, and click Download Manual Profiles
I revoked our distribution certificate on developer.apple.com and generated a new one. I was then able to upload to App Store Connect again.
I got this error on Xcode 13.2 (macOS v12.2.1 (Monterey)).
It's pretty easy to resolve:
Go to Xcode → Preferences...
On the new window, go to Accounts → select your Apple ID
Then, select your team, click *Manage Certificates...
Then, click on + on the left bottom, and click Apple Distribution
After that, click Download Manual Profiles
You can now Archive and it will work fine.
Create a new distribution certificate through Xcode. I have just done this and it now works.
Preferences → Accounts → Choose team → Manage certificates → + Apple distribution → Archive and upload.
Solution:-
Go to https://developer.apple.com/account/resources/profiles/list
Open the provision profile
Press Edit in the top right
Press Save without making any changes This will regenerate the profile with the correct CAs.
Now delete the ~/Library/MobileDevice/Provisioning Profiles folder and let xcode redownload the profiles again.
This is Work for me.
It has been an error since the Xcode 13.3 (13E113) + macOS v12.3.1 (Monterey) update from Apple.
You need to just regenerate Provisioning Profile, without the need to regenerate certificates.
It was resolved as per Invalid Provisioning Profile Signature - STATE_ERROR.VALIDATION_ERROR.90165
You must be using an old provisional profile certificate. Just regenerate it again and you will be good to go.
I resolved the same issue after following these steps:
Recreate Distribution Certificate (Make sure it should be Apple
Distribution).
Regenerate Provisioning profile by selecting the new
Certificate.
Open Spotlight, search and delete all Provisioning profiles from ~/Library/MobileDevice/Provisioning Profiles
Delete all previous Archives from /Users/YOUR_USER_NAME/Library/Developer/Xcode/Archives or you can go to the folder by clicking Xcode -> Preferences -> Location and got to the Archive location mentioned there.
Delete Derived Data by following the same step mentioned above.
Clean the Project (Cmd + Shift + k)
Archive again, Select the correct Provisioning profile while uploading the build.
Hopefully, this will help.

Xcode 8.3 / Xcode 9.0 Refresh provisioning profile devices

I have added some new devices. How can I refresh the provisioning profile, as Xcode 8 automatically manages signing assets?
I have found this question: Refresh devices in team provisioning profile managed by Xcode 7? – but we can't do that in Xcode 8.3.
I don't have the device with me so I manually added it in the portal and also edited the provisioning profile but Xcode is not re-downloading it.
This is what you need to do:
Go to ~/Library/MobileDevice/Provisioning\ Profiles/ and delete all the provisioning profiles from there.
Go to Xcode > Preferences > Accounts and select the Apple ID.
Click Download Manual Profiles or Download All Profiles. And it will download all the provisioning profiles again.
Remove the .mobileprovision file for the app this way :
The command in the terminal is : rm
Step 1. Click on desktop then from top menu Go > Go to Folders...
Step 2. Write/Paste following path and enter:
~/Library/MobileDevice/Provisioning\Profiles
Step 3. Select Provisioning Profiles folder and delete all provisions profiles in it
Step 4. Go to xCode Preference > Accounts > Apple ID and then click on Download Manual Profiles button
First delete the provisioning profile from ~/Library/MobileDevice/Provisioning\Profiles/ , then edit provisioning profile from developer portal and select all devices while editing Provisioning profile. Then download this profile and open in your Xcode.
To add devices to your provisioning profile in Xcode 8 with automatic code signing, you simply need to build to the device in Xcode. Xcode will add the device's UDID and regenerate the provisioning profile automatically. If you don't have physical access to the device, I don't think there is a way to add it to your provisioning profile without going back to manually managing your devices and profiles.

How to add provison Profile Certificate in Xcode 8.2.1

I have added 2 new devices with their UDID in apple developer website and downloaded the Mobile provision profile Certificate with extension(.mobileProvision).Now I need to add this in XCODE 8 so that when i host my app in Diawi.com so the URL will work in the devices which I have added.But I am not able to drag or import or install it.PLease tell me how will it work.
Just double click on Mobile provision profile Certificate with extension(.mobileProvision) file. It will install automatically. After that close your XCode and reopen it. Then you can select that provision profile Certificate under Signing in Build Settings. Or in General tab Signing select your team and click on Automatically manage signing. it will start working.
1) First install the certificates both for development and distribution.
2) Then install your development and adhoc provisioning profile you created.
3) Now switch to Xcode and select target project and then select General tab. Here turn off the automatically manage signing.
If everything is right with certificates and provisioning profiles, then your provisioning profile should be listed in drop down list when you set profiles for debug and release.

Provisioning profile issue in Xcode 7.1.1?

Earlier I was using Xcode 7 it used to show me the provisioning profile for the IPA file which I selected under build settings. But now after update to 7.1.1 whenever I make IPA file then it always show me iOS Team provisioning under provisioning profile section even I have selected the correct provisioning profile.
See screenshot:
Please tell me how to resolve the issue.
Edit:
In iOS Team Provisioning profile all the UDIDs are added which were previously added by me on developer account.
In developer.apple.com:
Go to Certificates, Identifiers & Profiles > Provisioning Profiles
Delete any provisioning profiles that are no longer needed.
Pay careful attention to those that match your app's bundle ID, for example, com.yourdomain.yourappname.
Make sure you have at most one provisioning profile for Development and at most one provisioning profile for Distribution.
Download each provisioning profile and double-click on it in Finder so that it gets installed.
In Xcode:
Go to Your Target > Build Settings > Code Signing
Set all values to be iOS Developer.
Go to Your Target > Build Settings > Provisioning Profile
Set all values to be Automatic.
In Xcode:
To test the changes, create an archive using Product > Archive.
After the archive is built, open the Window > Organizer and Export the archive.
Choose Developer Deployment.
Choose your team.
The provisioning profile display should now be correct for your app in the Summary window, the one that you have shown in your question.
Please follow the steps.
1.Open Xcode
2. then goto Xcode section
3. Select Preferences
4. Account
5. Select your account details
6. Click View Detail
7 .Sync details.

Adding provisioning profiles without Apple's account

Im having troubles to generate IPA's from a project. I have the Certificate in my keychain but now i cant add the provisioning profile.
I read that in Xcode 5 this is handled by the Xcode, so you have to add an Apple developers account.
Is there any way to skip this step? I have the provisioning profile downloaded.
Thanks and regards
Opening provisioning profile with Xcode will copy it to appropriate folder, so you can select it from project settings. Xcode will check /Users/youruser/Library/MobileDevice/Provisioning Profiles folder and you can also move you provisioning file there.
You need to have an Apple developer account to get provisioning profiles. When you got one go to Preferences -> Accounts -> Click on the + button.

Resources