Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Forms - Can't find provisioning profile (ios bundle signing)

I am using a macbook pro with visual studio community.

The error I receive in the console is:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(644,3): error : Could not find any available provisioning profiles for iOS.

I noticed that this error came up once we added the SecureStorage plugin to the project. Any commit prior doesn't result in this error.

I have done the following:

  • Opened up xCode >> Accounts >> Made sure my apple ID was there, downloaded the profiles manually. Also verified that my email address is correct in the description as well as my team (personal) was there too.

Screenshot From description above

  • Gone into project.ios >> Info.Plist and checked that the bundle identifier and application name is correct. Screenshot from info.plist

  • Enabled KeyChain access: project.iOS >> Entitlements.plist >> KeyChain >> Enabled KeyChain ticked >> KeyChain Groups >> Added correct keychain

KeyChain Enabled

The problem is then:

Then when I go into project.ios >> Info.Plist >> ios Bundle Signing >>

iOS Bundle Signing >> Provisioning Profile

It can't see any matching profiles. See screenshot

Any help would be greatly appreciated, thanks!

like image 279
Grublet Avatar asked Apr 02 '18 23:04

Grublet


1 Answers

This problem was tricky to solve for a few reasons:

  1. It was only an issue when we introduced the localStorage plugin into the project, prior to that there was no issue. This was misleading.
  2. It was not clear that you had to make an xCode project and link it to your apple ID, this was the root of the problem.
  3. I am new to ios app development and xamarin.

Solution

I did something similar to what's demonstrated here: https://www.youtube.com/watch?v=S9lNmnyACpY

Open up xCode and create a new project (can also do this under the apple developer page) and create a new project with the same namespace (eg: xfPOC in my case) as your xamarin forms project.

Copy the provisioning profile name it creates and then paste it into your "bundle identifier" in info.plist. From there, go into ios bundle signing and it should be able to find your provisioning profile.

My aplogies to @SushiHangover who was actually correct, I originally replied to him saying that my bundle identifier did match my provisioning profile(which at the time didn't exist). By "provisioning profile", I thought that was set up at the beginning of the xamarin forms project as the organization Identifier, this is confusing because VS copies that into the bundle identifier in info.plist, which isn't particularly helpful because it looks like it's set everything up for you, whereas you need to go and create it yourself in xcode or on the apple development page. Personally, when I did that in my project, the provisioning profile did not match the default bundle identifier that VS created.

like image 57
Grublet Avatar answered Oct 10 '22 19:10

Grublet