简体   繁体   English

Xcode 8 要求注册设备以创建配置文件

[英]Xcode 8 asks for a device to be registered to create provisioning profile

I am trying to publish an app for testing, without having to connect a device in my mac.我正在尝试发布用于测试的应用程序,而无需在我的 mac 中连接设备。

I have created a developer account, created an app in itunes, generated bundle id, signed into xcode with the developer account, generated a distributor certificate.我创建了一个开发者帐户,在 iTunes 中创建了一个应用程序,生成了 bundle id,使用开发者帐户登录到 xcode,生成了一个分销商证书。

When I tried to archive the app, I got the error "conflict provisioning setting. app is automatically signed for development ..."当我尝试存档应用程序时,出现错误“冲突配置设置。应用程序已自动签名以进行开发......”

I read in this post and followed the tip of unchecking and rechecking the option "Automatically manage signing".我在这篇文章中阅读并遵循了取消选中并重新选中“自动管理签名”选项的提示。 After re-choosing my team, I get the error "There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it".重新选择我的团队后,我收到错误消息“在开发者网站上您的帐户中没有注册设备。插入并选择一个设备以让Xcode注册它”。

The goal all along was that I wouldn't need an ios device, because I intended to immediately publish the application and invite people to test it via testflight.一直以来的目标是我不需要 ios 设备,因为我打算立即发布应用程序并邀请人们通过 testflight 对其进行测试。 Is it not possible to do it like this?难道不能这样做吗? Am I missing something.我是不是错过了什么。

I have read lots of documentation, but being a first timer in this, everything seems confusing.我已经阅读了很多文档,但作为第一次接触,一切似乎都令人困惑。

Edit: I created a provisioning profile as distributor.编辑:我作为分销商创建了一个配置文件。 Even after creating and installing the distributor profile (it now appears also in xcode at Account -> provisioning profiles), I still get that same error.即使在创建并安装了经销商配置文件(它现在也出现在 xcode 中的帐户 -> 配置文件中)之后,我仍然遇到同样的错误。 I also noticed that in signing, The signing certificate is iOS Developer.我还注意到在签名时,签名证书是 iOS Developer。 I am sure我相信

在此处输入图片说明

The solution (though I would welcome more elaborate, insightful explanations):解决方案(尽管我欢迎更详细、更有洞察力的解释):

  • @General -> Signing, disable the option "Automatically manage signing" @General -> 签名,禁用“自动管理签名”选项
  • @General -> Signing and certificates choose your team @General -> 签名和证书选择您的团队

Though in my case that was not the issue, I would recommend making sure that in the device list, you choose Generic iOS device in your target devices.虽然在我的情况下这不是问题,但我建议确保在设备列表中,您在目标设备中选择通用 iOS 设备。

I fixed it by plugging in my iPhone and going to menu Product > Destination > iPhone (my device).我通过插入我的 iPhone 并转到菜单Product > Destination > iPhone (我的设备)来修复它。

Then after clicking Try Again on this properties page the warnings went away.然后在此属性页面上单击再试一次后,警告消失了。

Source来源

If you do not wish to register a device follow this advice:如果您不想注册设备,请遵循以下建议:

https://stackoverflow.com/a/44157307/499581 https://stackoverflow.com/a/44157307/499581

* In short use "Generic" as the device while archiving.

If you do wish to register a device then the solution to:如果您确实希望注册设备,则解决方案为:

"There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it". “在开发者网站上,您的帐户中没有注册设备。插入并选择一个设备以让 Xcode 注册它”。

Is to physically plug-in your device (an actual iPhone, or iPad) so that Xcode can register it for development use (note: this will not affect the normal everyday use of the device).是将您的设备(实际的 iPhone 或 iPad)物理插入,以便 Xcode 可以注册它以进行开发使用(注意:这不会影响设备的正常日常使用)。 After the device is registered it can then be used for development testing, load provisioning profiles onto it, etc.设备注册后,可用于开发测试、在其上加载配置文件等。

Disabling and Enabling Devices Using Your Developer Account 使用您的开发者帐户禁用和启用设备

What happened to me was that I was about to run my app on a physical device for the first time and I didn't have a Team.发生在我身上的是我第一次在物理设备上运行我的应用程序,我没有团队。 So I created it in the process before connecting my phone with the USB cable.所以我在用 USB 线连接我的手机之前在这个过程中创建了它。 After I created the team a message like the listed above appeared.在我创建团队后,出现了上面列出的消息。 I did some research on internet but nothing found.我在互联网上做了一些研究,但没有找到。

So here's what I did: I connected my phone, did all the trusted process, then restarted Xcode, and it worked.所以这就是我所做的:我连接了我的手机,完成了所有受信任的过程,然后重新启动 Xcode,它工作正常。 I am not sure what happened, but it was some of my first experiences using Xcode.我不确定发生了什么,但这是我第一次使用 Xcode 的经历。 It could sounds silly but it helped me.这听起来很傻,但它帮助了我。 Hope to you too.也希望你。

This really sucked to figure out.这真的很难弄清楚。

What you do is add a distribution profile in https://developer.apple.com/account/resources/profiles/add .您要做的是在https://developer.apple.com/account/resources/profiles/add 中添加分发配置文件。 Don't choose development!不要选择发展! Don't let the Xcode Automatically manage signing!!不要让 Xcode 自动管理签名!!

Then, you download the provision.然后,您下载该规定。

Then, in the Signing & Capabilities -> Signing Section of the project.xcodeproj file, turn off Automatcially manage signing, choose import and import the file you just downloaded.然后,在 project.xcodeproj 文件的 Signing & Capabilities -> Signing Section 中,关闭 Automatcially manage signature ,选择 import 并导入您刚刚下载的文件。

Then, in the top, you choose Any iOS Device (arm64, armv7) and then you go Product -> Archive.然后,在顶部,选择 Any iOS Device (arm64, armv7),然后转到 Product -> Archive。

它的形象

For those who are trying to develop without a mac computer using MacInCloud don't follow the standard advice out there.对于那些尝试在没有 Mac 计算机的情况下使用MacInCloud进行开发的人,请不要遵循那里的标准建议。 Its will lead you down a hole.它会带你下一个洞。 I have wasted hours of my time.我浪费了几个小时的时间。

The reason it say something about "a device to be registered to create provisioning profile" is that you need to provision an iOS device that you can test on before you can get it signed.之所以说“要注册以创建配置文件的设备”,是因为您需要先配置一个可以测试的 iOS 设备,然后才能对其进行签名。 If you are using MacInCloud you probably can't physically connect an iPhone or iPad to the MacInCloud and therefore it can't automatically provision devices for you.如果您使用MacInCloud,您可能无法将 iPhone 或 iPad 物理连接到MacInCloud ,因此它无法自动为您配置设备。

Before you get to far into this you will need to get your iPhone/iPad UDID.在深入研究之前,您需要获取您的 iPhone/iPad UDID。 Which I was able to do with https://get.udid.io/ on my iPhone, but it didn't work on my iPad.我可以在 iPhone 上使用https://get.udid.io/做到这一点,但它在我的 iPad 上不起作用。 Instead, with the iPad I had to download iTunes from the Windows store and connect my iPad.相反,对于 iPad,我必须从 Windows 商店下载 iTunes 并连接我的 iPad。 Then click on the little gray square in the menu that's inline with Library tab.然后单击与“库”选项卡内联的菜单中的灰色小方块。 image of itunes iTunes 的图像

Then when it pops up with your device info (mine didn't come up with my info at first, I had to sync my device).然后当它弹出你的设备信息时(我的一开始没有提供我的信息,我不得不同步我的设备)。 You will see your SN.您将看到您的 SN。 Click on your SN and it will change to your UDID.单击您的 SN,它将更改为您的 UDID。 Once you have your UDID you are ready to create a provisioning profile.获得 UDID 后,您就可以创建配置文件了。 What is confusing is this isn't done in the appstoreconnect section of your account online.令人困惑的是,这不是在您的在线帐户的 appstoreconnect 部分中完成的。 Its done in your developer account: https://developer.apple.com/account developer.apple.com account screen shot When you go there you will want to click: Certificates, Ids & Profiles它在您的开发者帐户中完成: https : //developer.apple.com/account developer.apple.com 帐户屏幕截图当您去那里时,您需要单击:证书、ID 和配置文件

Here you will need to add your devices and then with auto signing checked in Xcode that made the problem go away.在这里,您需要添加您的设备,然后在 Xcode 中检查自动签名,使问题消失。 NOTE: I originally tried to create a profile, download it, and import into Xcode under the Provisioning Profile dropdown in Signing & Capabilities.注意:我最初尝试创建一个配置文件,下载它,然后在 Signing & Capabilities 中的 Provisioning Profile 下拉菜单下导入到 Xcode。 As described in another answer here, but that proved more problematic and wasn't necessary.如此处的另一个答案所述,但事实证明这更有问题,并且没有必要。

Then you can chose Any iOS Device from emulator device drop down then go to Product > Archive > Distribute App and create a certificate to place it on the app store (TestFlight).然后,您可以从模拟器设备下拉菜单中选择 Any iOS Device,然后转到 Product > Archive > Distribute App 并创建证书以将其放置在应用商店 (TestFlight) 中。

你也可以插入一个iphone,在你的iphone上运行app作为目标,它会要求你注册设备然后生成证书

Have you paid the $99/year developer fee?您是否支付了 99 美元/年的开发者费? TestFlight is only available for paid developers. TestFlight 仅适用于付费开发人员。 I would highly recommend plugging in an iOS device, though.不过,我强烈建议插入 iOS 设备。 It's more fun and rewarding testing that way.这样的测试更有趣也更有意义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM