Could not find any available provisioning profiles for iOS

We are developing a iOS shopping cart application in c# and visual studio 2017 for xamarin. I have an iPad Air iOS 10.3, when I try to publish to real device, I am getting the following error message: "Could not find any available provisioning profiles for iOS", I have tried to restart my Mac - without result. Give me any suggestion to resolve this issue?


Solution 1:

In Visual Studio for OSX, go to Visual Studio Community > Preferences > Publishing > Apple Developer Account and click to + button to sign in and add your developer account. In theory after that automatic provisioning should work.

In Visual Studio for Windows, go to Tools > Options > Xamarin > Apple Accounts, you will get a prompt to install FastLane before your Apple ID will show up under Automatic Provisioning.

Solution 2:

You must create a provisioning profile. Search on Google, how to do it.

But, the secret is: when you create a provisioning profile, you must associate an App ID to this profile, like: "com.companyname.*".

When you create your app in visual studio, you must set in the INFO.PLIST file on IOS PROJECT, the Bundle Identifier to "com.companyname.myapp1" or anything else. If your Bundle Identifier has a name like "com.myapp.app1", you will get this error: Could not find any available provisioning profiles for iOS, because your profile accept only apps with the names started with com.companyname and you are using a appname different.

Solution 3:

For those who just want to deploy/test their app on a real device with "Free provisionning" follow this official guide.

To sum it up :

  • Create an apple id
  • Add the previously created apple id to XCode in order to add a provisioning profile.
  • Create a new empty iOS app with the bundle identifier equals to the one of your Xamarin app (you can find it in Info.plist of your Xamarin.iOS project).
  • Ensure that your empty iOS app could be deployed, by running it from XCode on your device with your free provisioning profile.
  • In Visual Studio open Info.plist and click on Bundle Signing Options..., in Signing identity chose Developper automatic and Automatic in Provisioning profile.
  • Run your Xamarin.iOS app on your device.

Solution 4:

I suggest you read this documentation to learn more about iOS provisioning.

What you want is called automatic provisioning though. It takes care of all the complex things about provisioning for you and just deploys the app.

Visual Studio on Windows has the automatic provisioning feature in preview (called 15.7) right now (preview 3): https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-preview-relnotes#xamarin-provisioning.
I recommend you try that, it should help you automatically add your iPad to the relevant provisioning profile.

Visual Studio for Mac has had automatic provisioning for a couple releases now.

Note: you do need an Apple Developer account to deploy on device (it can be a free developer account).