I'm developing a .NET MAUI application and I need to store an access token using the SecureStorage API. I followed this guide from the Microsoft Documentation which states that the Keychain Entitlement should be added when deploying to the iOS simulator.
However, once the Entitlement is enabled if I try to run the app from Visual Studio for Mac I get the following error: Could not find any available provisioning for MauiApp on iOS
.
Despite the error message is clear, I am not able to find any clear information about what am I supposed to do in order to solve this problem.
Since you don't have a Apple Dev account, you could use XCode to apply free provisioning. You could refer to Free provisioning for Xamarin.iOS apps(also works for MAUI but with a little difference).
To conclude, there are following steps:
1.Use Xcode to create a signing identity and provisioning profile
Create a XCode project with any Bundle Identifier you want. Enable Automatically manage signing. Select your Personal team if don't have other accounts. Then XCode will create the provisioning file for you.
Bundle Identifier of Maui project should be identical to the Bundle ID of XCode project you just created. Also select the provisioning file created by XCode.
Then you could run your Maui project.
Hope it works.