Home > Software engineering >  Xamarin.iOS not found provision profiles in Visual Studio 2019, 2022
Xamarin.iOS not found provision profiles in Visual Studio 2019, 2022

Time:01-06

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. enter image description here
  6. Download and install certificates and profiles for XCode
  7. Created new project at MacOS with the same identifier like in Visual Studio project. enter image description here
  8. Open in Visual Studio my project and connecting to MacOS. enter image description here enter image description here enter image description here 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?

CodePudding user response:

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 enter image description here

  • XCode -> File -> New -> Project -> App -> Choose Team and check Bundle Identifier.
  • enter image description here 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: enter image description here

    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.

    enter image description here

    For Debug provision profile:

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

    enter image description here 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.

    •  Tags:  
    • Related