Hello,
Since there are some valid certificates in "Keychain Access" on Mac and you can open the ...\AppData\Local\Xamarin\iOS\Provisioning(certificates) folders, there is an easy way to import certificate and provisioning profile into VS, please follow the steps blow:
- Open "Keychain Access“, find a valid development certificate, right-click it and choose "Export...", and then you can enter a password, and you will get a p12 file.
- Move/Copy this p12 file to your Windows machine.
- Open VS 2022 and go to Tools-> Options-> Xamarin-> Apple Accounts->select the account you login -> View Details->Import Certificate, select the p12 file on step2 and enter the password on step1.
After that, the certificate will exist on the \AppData\Local\Xamarin\iOS\Certificates folders.
If you have the matching provisioning profile (*.mobileprovision files), you could move it to \AppData\Local\Xamarin\iOS\provisioning folder.
And then, you could select the Signing identity (certificate) and provisioning profile for your project.
(Open your project->right-click and open Properties window->iOS->Bundle Signing)
Important
According to the description, you have revoked the current development cert from Apple account and delete the associated development profile from Apple account. It's not clear that if the valid certificate on "Keychain Access" is matched with the previous development provisioning profile (Or if the development provisioning profile was expired or you deleted/revoked it by mistake) .
It's better to create a new development provisioning profile with the valid development certificate on Keychain Access. Please follow the steps below:
- Open Apple developer portal, under Certificates tab, confirm the valid development certificate is same as that on Keychain Access.
- Go to Profiles tab, choose iOS App Development -> choose the AppID (your MAUI project AppID or the wildcard AppID) ->select all certificates -> all devices->enter name->Generate->Download, and then you will get a development provisioning profile (*.mobileprovision files).
- Move it to \AppData\Local\Xamarin\iOS\provisioning folder.
For more details, you could refer to Manual provisioning for .NET MAUI iOS apps - .NET MAUI | Microsoft Learn
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.