我在OS X El Capitan上安装了Xcode 8。
我得到这个错误:
签署“目标”需要一个开发团队。在项目编辑器中选择一个开发团队。 在SDK“iOS 10.0”中,产品类型“应用程序”需要代码签名
我在OS X El Capitan上安装了Xcode 8。
我得到这个错误:
签署“目标”需要一个开发团队。在项目编辑器中选择一个开发团队。 在SDK“iOS 10.0”中,产品类型“应用程序”需要代码签名
当前回答
要在真正的设备上运行你的应用,你需要有一个Apple ID,并用这个ID注册你的设备。这就是为什么您会得到这个错误。
你可以这样做。
Go to the project Navigator. Cmd-1 if you can't find it. Click the project target dropdown and pick Target. Click on the Team dropdown and pick add an account. Sign in with your Apple ID that is linked to your developer account, or just your Apple if you don't have a dev account. If you haven't registered your device with that account yet, a button will appear, something like 'Register device'. Click that and Apple will register the device and do the certificates and code signing. (Oh my unicorns certificates and signing is so much easier than it used to be)
选择您的物理设备并点击运行,它应该加载到您的设备上没有错误。
其他回答
添加开发者账号到Xcode:
按Cmd⌘+,(逗号) 转到帐户选项卡 按照下面的屏幕截图来启用开发团队:
至少在某些情况下,可能还需要信任移动设备上的开发者配置文件。如果您在移动设备上看到“不受信任的开发人员”错误对话框,请参阅此问答。
好吧,在我做了所有这些事情之后,我仍然有错误,所以我关闭Xcode,重新打开它,然后它就工作了。
Xcode-8.1 & iOS-10.1
在Xcode首选项中添加Apple ID
启用签名自动&&选择您之前创建的团队:
更改Bundle标识符:
代码签名到iOS开发者:
将配置文件设置为自动:
您现在可以在设备上运行项目了!
Xcode 11.4
点击:
你的项目 签约与能力 选择你的团队。
如果您仍然遇到这个问题,请单击测试并为它们选择一个团队。