How can I add a provisioning profile to my iOS project in VS 2022 for Mac?

Kim Strasser 661 Reputation points
2022-11-02T21:09:47.867+00:00

I have created a new iOS project in VS 2022 for Mac. But I get this error when I want to debug my iOS project on my iPad:

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/tools/msbuild/iOS/Xamarin.Shared.targets(3,3): Error: Could not find any available provisioning profiles for TestProjectios on iOS.  

I use Visual Studio for Mac 2022 17.3.8 (build 5).
How can I add a provisioning profile to my iOS project in VS 2022 for Mac?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,302 questions
0 comments No comments
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 27,126 Reputation points Microsoft Vendor
    2022-11-03T08:40:01.07+00:00

    Hello @Kim Strasser ,

    You can right-click your iOS project, go to Properties -> Build->iOS Bundle Signing, then select Developer (Automatic) for Signing Identity and the corresponding provisioning profile. If there is not a valid profile, you can go to Preference->Publishing->Apple Developer Accounts, select your account and view details, then download the profile. If there is still not a valid profile, you have to create a new one, see Manual provisioning for Xamarin.iOS - Xamarin | Microsoft Learn

    A paid Apple Developer account is required to use this feature. If your account is Individual, please go to App Store Connect, click User and Access, go to Keys tab, choose App Store Connect API, then generate an API Key, and enter the information in VS (Preference->Publishing->Apple Developer Accounts->Add->Individual Account). For more details, you can refer to Apple Developer Documentation - Creating API Keys for App Store Connect API
    If it is Enterprise, you can add this account directly.

    If you do not have a paid Apple developer account and you are using a free provisioning for Xamarin.iOS apps, the Bundle Identifier in the Xamarin.iOS project and the Xcode project should be the same, because Xcode will only create a provisioning profile for an explicit App ID.

    (Note: If you cannot see your signing identity or the correct provisioning profile, you may need to restart Visual Studio for Mac.)

    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.


0 additional answers

Sort by: Most helpful