Issue
Visual Studio 2019 or 2022 doesn't recognize active provision profiles for Xamarin.iOS. My activities to resolve the issue:
- Removed bin and obj folder at Visual Studio Project.
- Removed old profiles on Windows from here: %LOCALAPPDATA%\Xamarin\iOS\Provisioning\Profiles
- Removed profiles on Mac OS: ~/Library/MobileDevice/Provisioning\ Profiles
- Removed certificates from Keychain Access on Mac OS.
- Created new certificates and provision profiles at Apple Developer site.
- Download and install certificates and profiles for XCode
- Created new project at MacOS with the same identifier like in Visual Studio project.
- 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?
Solution
I resolved the issue of updating provisioning profiles as follows:
For for Release profiles:
- Clear all provisioning profiles under path ~/Library/MobileDevice/Provisioning Profiles
- Add developer account in XCode:
XCode -> Preferences -> Accounts -> "+" -> AppleID
then click "Download Manual Profiles"
- 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>
Xamarin.iOS: https://aka.ms/xvs/pkg/macios/15.0.0.18
Xamarin.Mono: https://aka.ms/xvs/pkg/mono/6.12.0.107
- 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.
Answered By - Polyariz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.