Xamarin Studio not Recognizing Provisioning Profiles
Asked Answered
C

6

18

I'm at my wit's end with these apple certificates. I have a Xamarin.Forms app that I need to sign with a provisioning profile so I can enable push notifications. However, Xamarin Studio isn't recognizing any of the provisioning profiles that I'm making. Can someone please help?

Xamarin Studio trying to link provisioning profiles, profile 23devpp not found: enter image description here

Xcode finds prov. profile 23devpp: enter image description here

Developer window has provisioning profile marked as active: enter image description here

Clough answered 23/1, 2016 at 20:38 Comment(1)
NOTE: The actual answer was in the comment section of the selected answer. Still, restarting Xamarin Studio is necessary sometimes to refresh the provisioning profiles.Clough
S
18

EDIT: Here's the solution

The Bundle Identifier in your Xamarin iOS project's Info.plist has to match the one in the App ID you used for your profile. I just tried this and i replicated your problem - when i corrected the Bundle Identifier my test profile showed up


(I want to make this a comment but I can't yet) Sorry but have to ask the stupid question- did you try restarting Xamarin?

Note: It is sometime necessary to stop and restart Xamarin Studio before it will see any new or modified certificates or profiles updated by Xcode.

Sumikosumma answered 23/1, 2016 at 20:57 Comment(5)
Yeah, I've restarted multiple times and even tried shutting down my entire computer.Clough
ok i think I found your solution - the Bundle Identifier in your Xamarin iOS project's Info.plist has to match the one in the App ID you used for your profile. I just tried this and i replicated your problem - when i corrected the Bundle Identifier my test profile showed upSumikosumma
Wow, thank you so much! I'd worked on this for hours but never thought to check the Info.plist. I can't believe I didn't find that isn't anywhere else online. Thank you for your help.Clough
@Sumikosumma why don't you edit your answer to include that answer? Now you can comment :)Massasoit
In my case when App ID was wrong I got different error explicitly saying this: Info.plist : error : Project bundle identifier 'com.example.appname' does not match specified provisioning profile 'ProvisioningProfileName' [/Users/workspace/project/builds/MyApp.csproj]. But, please note that I'm using explicit Profile setting, not Automatic. Also, really still not sure restarting Xamarin needed here, I did it several times during the whole way resolving this, but it never was the final step which helped.Caliber
L
5

There is a potential second reason you can't find your provisioning profile in Xamarin Studio, if the bundle identifier in the accepted response above matches: Your Signing Identity must match the Provisioning Profile you're using. If you have generated new certificates for signing the app, e.g. because your old certificate was about to expire, Xamarin Studio won't necessarily have access to the new certificate's private key. This is required in order to display the correct Signing Identity and associated Provisioning Profile in Xamarin Studio.

To check if this is your issue, sign in to Apple's Developer Portal -> Certificates, Identifiers & Profiles -> Provisioning Profiles. Select the profile you want to use, and note the "Expires" date of the profile.

Then, open Keychain Access and find the signing certificate with the matching "Expires" date under Certificates. It should be possible to expand the certificate, and a private key should appear when you expand it. If you don't have a private key for the certificate, or if the certificate itself is missing, you have to install the certificate with its associated private key.

To do this, either generate a completely new certificate in the Developer portal, or get someone else on your team to export the certificate with its private key. You install it by double-clicking it on your Mac and entering its passphrase.

Leftwards answered 16/6, 2016 at 10:37 Comment(1)
Thank you so much for pointing this out! I'm so glad I read this unvoted answer! Have been searching for about two hours now ...Kelson
T
4

1.Go to Xcode, create a new project. Select your company name(do not select user), then type in anything you want as your bundle identifier.

2.Go back to Xamarin studio and change the bundle identifier to match the one you just created in Xcode.

3.Update the provisioning profile in options to include the bundle identifier you created in Xcode. Build, then Debug the solution and it should work.

For me the issue was the team identifier contained the only provisions, and the only selection in Xamarin studio were users. I just created a new project in Xcode that pointed to the team provision, then used that new bundle identifier (that was uploaded to the Apple dev site) in Xamarin studio.

Tumbleweed answered 8/12, 2016 at 18:19 Comment(0)
D
2

In case anyone else comes across this post while (it was the second hit for me when Googling this error now), my issue wasn't quite any of the above.

The profile I created in Xcode was based on com.company.myapp, but the identifier in Visual Studio was com.company.MyApp. The case sensitivity matters. However, when changing in Xcode to match VS, it kept failing with an error. I had to append a number to the end, so both then read com.company.MyApp1 - and then it worked (after restarting VS).

Just in case it helps anyone else.

Dispirited answered 23/4, 2018 at 18:13 Comment(0)
R
0

In my case, Visual studio was listing my provisioning profile but the issue was its not updated.

Problem :


  • XX.mobileprovision was generated with 10 devices and some entitlements.
  • Client asked to add some more device and entitlements were also modified to support new features.
  • installed XX_new.mobileprovision

The problem I faced, Visual studio was considering old PP, not new information which I installed through XX_new.mobileprovision

Solution :


  • Visual studio takes this provision profile from, ~/Library/MobileDevice/Provisioning Profiles

  • Go to this directory and delete corresponding provisioning profile.

  • Install XX_new.mobileprovision and you are good to go, Visual Studio will recognize all the changes of profile and list of profiles will also be updated.

Readjustment answered 15/2, 2018 at 6:47 Comment(0)
V
0

For those of you using Xamarin.Forms on Visual Studio 2019 (Windows):

  1. In the Solution Explorer window, right-click the iOS project > Properties.
  2. Click iOS Bundle Signing (on the left) and enter your Apple ID (case sensitive, it must be the same as the Apple ID in XCode on your Mac).
  3. Save your changes. The progress indicator will run forever (Running automatic provisioning), it must be a bug. Just close the tab and build your project.

NOTE: If you don't have your Apple ID in XCode on your Mac. Go to you MAC:

  1. Open XCode.
  2. From XCode menu, choose XCode > Preferences, then click on the Accounts tab and configure your Apple ID.

Don't forget to restart Visual Studio 2019.

Veliz answered 21/5, 2020 at 19:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.