xcode Xamarin Studio 无法识别配置文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34968571/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xamarin Studio not Recognizing Provisioning Profiles
提问by Oblivionkey3
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.Forms 应用程序,我需要使用预配配置文件对其进行签名,以便我可以启用推送通知。但是,Xamarin Studio 无法识别我正在制作的任何配置文件。有人可以帮忙吗?
Xamarin Studio trying to link provisioning profiles, profile 23devpp not found:
Xamarin Studio 尝试链接配置文件,未找到配置文件 23devpp:
Xcode finds prov. profile 23devpp:
回答by BoombaleOsby
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
Xamarin iOS 项目的 Info.plist 中的捆绑标识符必须与用于配置文件的 App ID 中的标识符相匹配。我刚刚试过这个,我复制了你的问题 - 当我更正捆绑标识符时,我的测试配置文件出现了
(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?
(我想对此发表评论,但我还不能)抱歉,但不得不问一个愚蠢的问题 - 您是否尝试重新启动 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.
注意:有时需要停止并重新启动 Xamarin Studio,然后才能看到由 Xcode 更新的任何新的或修改的证书或配置文件。
回答by Geir Smestad
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.
如果上述接受的响应中的包标识符匹配,则可能在 Xamarin Studio 中找不到配置文件的第二个原因是:您的签名标识必须与您正在使用的配置文件匹配。如果您生成了用于签署应用程序的新证书,例如因为您的旧证书即将过期,Xamarin Studio 不一定可以访问新证书的私钥。这是在 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.
要检查这是否是您的问题,请登录 Apple 的开发者门户 -> Certificates, Identifiers & Profiles -> Provisioning Profiles。选择您要使用的配置文件,并注意配置文件的“到期”日期。
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.
然后,打开 Keychain Access 并在 Certificates 下找到具有匹配“Expires”日期的签名证书。证书应该可以展开,展开时应该会出现私钥。如果您没有证书的私钥,或者证书本身丢失,则必须安装带有关联私钥的证书。
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.
为此,请在开发人员门户中生成一个全新的证书,或者让团队中的其他人使用其私钥导出证书。您可以通过在 Mac 上双击它并输入其密码来安装它。
回答by Bjt1776
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.
1.转到Xcode,创建一个新项目。选择您的公司名称(不要选择用户),然后输入您想要的任何内容作为捆绑标识符。
2.Go back to Xamarin studio and change the bundle identifier to match the one you just created in Xcode.
2. 返回 Xamarin Studio 并更改包标识符以匹配您刚刚在 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.
3. 更新选项中的配置文件以包含您在 Xcode 中创建的包标识符。构建,然后调试解决方案,它应该可以工作。
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.
对我来说,问题是团队标识符包含唯一的规定,而 Xamarin Studio 中唯一的选择是用户。我刚刚在 Xcode 中创建了一个指向团队配置的新项目,然后在 Xamarin Studio 中使用了新的包标识符(已上传到 Apple 开发站点)。
回答by Zecrah
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).
我在 Xcode 中创建的配置文件基于 com.company.myapp,但 Visual Studio 中的标识符是 com.company.MyApp。区分大小写很重要。但是,在 Xcode 中更改以匹配 VS 时,它一直失败并出现错误。我必须在末尾附加一个数字,因此两者都读取 com.company.MyApp1 - 然后它起作用了(重新启动 VS 后)。
Just in case it helps anyone else.
以防万一它可以帮助其他人。
回答by Richard H
For those of you using Xamarin.Forms on Visual Studio 2019(Windows):
对于在Visual Studio 2019(Windows)上使用 Xamarin.Forms 的人:
- In the Solution Explorerwindow, right-click the iOS project > Properties.
- 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).
- 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.
- 在解决方案资源管理器窗口中,右键单击iOS 项目 > 属性。
- 单击iOS Bundle Signing(左侧)并输入您的Apple ID(区分大小写,它必须与 Mac 上 XCode 中的 Apple ID 相同)。
- 保存您的更改。进度指示器将永远运行(Running automatic provisioning),它一定是一个错误。只需关闭选项卡并构建您的项目。
NOTE: If you don't have your Apple ID in XCode on your Mac. Go to you MAC:
注意:如果您在 Mac 上的 XCode 中没有您的 Apple ID。去找你 MAC:
- Open XCode.
- From XCode menu, choose XCode > Preferences, then click on the Accountstab and configure your Apple ID.
- 打开XCode。
- 从 XCode 菜单中,选择XCode > Preferences,然后单击Accounts选项卡并配置您的 Apple ID。
Don't forget to restart Visual Studio 2019.
不要忘记重新启动Visual Studio 2019。
回答by Afzal Ali
In my case, Visual studio was listing my provisioning profile but the issue was its not updated.
就我而言,Visual Studio 列出了我的配置文件,但问题在于它没有更新。
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
- XX.mobileprovision 是用 10 台设备和一些权利生成的。
- 客户要求添加更多设备,并且还修改了权限以支持新功能。
- 安装 XX_new.mobileprovision
The problem I faced, Visual studio was considering old PP, not new information which I installed through XX_new.mobileprovision
我面临的问题,Visual Studio 考虑的是旧 PP,而不是我通过 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.
Visual Studio 从 ~/Library/MobileDevice/Provisioning Profiles 获取此配置文件
转到此目录并删除相应的配置文件。
安装 XX_new.mobileprovision 就可以了,Visual Studio 将识别配置文件的所有更改,并且配置文件列表也将更新。