Xamarin Forms - 找不到配置文件(ios 包签名) [英] Xamarin Forms - Can't find provisioning profile (ios bundle signing)

查看:73
本文介绍了Xamarin Forms - 找不到配置文件(ios 包签名)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有 Visual Studio 社区的 macbook pro.

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):错误:找不到任何适用于 iOS 的可用配置文件.

我注意到,一旦我们将 SecureStorage 插件 添加到项目中,就会出现此错误.之前的任何提交都不会导致此错误.

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.

  • 打开 xCode >> Accounts >> 确保我的 Apple ID 在那里,手动下载配置文件.还验证了我的电子邮件地址在描述中是否正确以及我的团队(个人)也在那里.

以上描述的截图

启用钥匙串访问:project.iOS >> Entitlements.plist >> KeyChain >> 启用钥匙串勾选 >> KeyChain Groups >> 添加正确的钥匙串

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

启用钥匙串

然后当我进入 project.ios >> Info.Plist >> ios Bundle Signing >>

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

iOS 捆绑签名 >> 配置文件

iOS Bundle Signing >> Provisioning Profile

它看不到任何匹配的配置文件.看截图

It can't see any matching profiles. See screenshot

推荐答案

这个问题很难解决,原因如下:

This problem was tricky to solve for a few reasons:

  1. 只有当我们在项目中引入 localStorage 插件时才出现问题,在此之前没有问题.这是误导.
  2. 不清楚您是否必须制作一个 xCode 项目并将其链接到您的 Apple ID,这是问题的根源.
  3. 我是 ios 应用开发和 xamarin 的新手.

解决方案

我做了一些类似于这里演示的事情:https://www.youtube.com/watch?v=S9lNmnyACpY

打开 xCode 并创建一个新项目(也可以在苹果开发者页面下执行此操作)并创建一个与您的 xamarin 表单项目具有相同命名空间(例如:xfPOC 在我的情况下)的新项目.

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.

复制它创建的配置文件名称,然后将其粘贴到 info.plist 中的捆绑标识符"中.从那里,进入 ios 捆绑签名,它应该能够找到您的配置文件.

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.

我向@SushiHangover 道歉,他实际上是正确的,我最初回复他说我的包标识符确实与我的配置文件匹配(当时不存在).通过配置文件",我认为它是在 xamarin 表单项目的开头设置为组织标识符,这令人困惑,因为 VS 将其复制到 info.plist 中的包标识符中,这并不是特别有用,因为它看起来就像它为您设置了一切,而您需要自己在 xcode 或苹果开发页面上创建它.就我个人而言,当我在我的项目中这样做时,配置文件与 VS 创建的默认包标识符不匹配.

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.

这篇关于Xamarin Forms - 找不到配置文件(ios 包签名)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆