简体   繁体   中英

Xamarin.iOS not found provision profiles in Visual Studio 2019, 2022

Visual Studio 2019 or 2022 doesn't recognize active provision profiles for Xamarin.iOS. My activities to resolve the issue:

  1. Removed bin and obj folder at Visual Studio Project.
  2. Removed old profiles on Windows from here: %LOCALAPPDATA%\Xamarin\iOS\Provisioning\Profiles
  3. Removed profiles on Mac OS: ~/Library/MobileDevice/Provisioning\ Profiles
  4. Removed certificates from Keychain Access on Mac OS.
  5. Created new certificates and provision profiles at Apple Developer site. 在此处输入图像描述
  6. Download and install certificates and profiles for XCode
  7. Created new project at MacOS with the same identifier like in Visual Studio project. 在此处输入图像描述
  8. Open in Visual Studio my project and connecting to MacOS. 在此处输入图像描述 在此处输入图像描述 在此处输入图像描述 And I observe, that Visual studio not found Developer Profile and for Release mode set old removed profile. The option with automatic preparing is not fit, because VS just create yet a new profile. Are there any idia to resolve it?

Here are all the steps you can try: 1.Modify the "Scheme" to "Automatic Provisioning" and check if it works.

2.Clear all provisioning profiles under path ~/Library/MobileDevice/Provisioning Profiles.

3.Check if the bundle ID in the Mac is consistent with the bundle ID of your project.

4.Follow the document Manual provisioning for Xamarin.iOS to create new profiles.

6.Update the VS to the latest.

5.If all the steps doesn't work, try to report a problem on Developer Community .

I resolved the issue of updating provisioning profiles as follows:

For for Release profiles:

  1. Clear all provisioning profiles under path ~/Library/MobileDevice/Provisioning Profiles
  2. Add developer account in XCode: XCode -> Preferences -> Accounts -> "+" -> AppleID then click " Download Manual Profiles " 在此处输入图像描述
  3. XCode -> File -> New -> Project -> App -> Choose Team and check Bundle Identifier.

在此处输入图像描述 Bundle ID must be the same like in Visual Studio project in Info.plist .

<key>CFBundleIdentifier</key>
<string>com.your_identifier</string>  
  1. Set required profiles in XCode project: 在此处输入图像描述

  2. Updated VS 2019 on Windows

  3. Updated on Mac:

Xamarin.iOS: https://aka.ms/xvs/pkg/macios/15.0.0.18

Xamarin.Mono: https://aka.ms/xvs/pkg/mono/6.12.0.107

  1. Restart Mac OS and Re-connected to Mac from Visual Studio. Now Release profiles were updated in VS.

在此处输入图像描述

For Debug provision profile:

Developer profile was not recognized, and I choose "Automatic Provisioning" in Visual studio.

在此处输入图像描述 The project was successfully launched for debugging. A very important problem remained - push notifications did not work in debug and release mode. The problem was resolved when I removed Xamarin folder from cache on Mac OS:

~/Library/Caches/Xamarin

When I rebuilt the application, push messages began work in debug and release.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM