xcode 没有任何有效的配置文件包含设备 iPhone

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34760182/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:25:25  来源:igfitidea点击:

None of the valid provisioning profiles include the devices iPhone

iosxcode

提问by Haris

I am getting the error below when I connect the iPhone to my PC and try to run the application from Xcode. Where as in emulator I am able to run the application without any problem.

当我将 iPhone 连接到我的 PC 并尝试从 Xcode 运行应用程序时,出现以下错误。在模拟器中,我可以毫无问题地运行应用程序。

Code Sign error: No matching provisioning profiles found: None of the valid provisioning profiles include the devices:
iPhone 

Screenshot for error

错误截图

What could be the issue? I already found the answer here None of the valid provisioning profiles include the devicesbut confused that's the same issue as mine. I am newbie to IOS.

可能是什么问题?我已经在这里找到了答案没有一个有效的配置文件包含设备,但很困惑,这与我的问题相同。我是IOS的新手。

采纳答案by Aamir

You need to setup profile in Build Settingsof your project. Make a new profile after adding UDIDof your iPhone on Developer Member Centre(If you haven't added it already).

您需要在Build Settings项目中设置配置文件。UDID开发者会员中心添加你的 iPhone后创建一个新的配置文件(如果你还没有添加它)。

Please refer Maintaining Identifiers, Devices, and Profilesif you want to go through whole process of Managing Provisioning Profile

如果您想完成管理配置文件的整个过程,请参阅维护标识符、设备和配置文件

If you want to Add Device ID in existing Provisioning Profile, follow these steps:

如果要在现有 中添加设备 ID Provisioning Profile,请按照下列步骤操作:

  1. Go to Member Centre
  2. Select your Provisioning Profile
  3. Press Edit
  4. Click on CheckBox with appropriate device name under devices Tab.
  1. 前往会员中心
  2. 选择您的配置文件
  3. 按编辑
  4. 单击设备选项卡下具有适当设备名称的复选框。

After performing above steps, download Updated Provisioning Profile, but before installing it, delete Old Provisioning Profile.

执行上述步骤后,下载Updated Provisioning Profile,但在安装之前,删除Old Provisioning Profile.

回答by Krzysztof

It means that the provisioning profile does not contain device id of the phone you are trying to run the app on. The other answer you mention looks like the correct way of solving it (Go to developer.apple.com and register your iPhone there then include the device id in the provisioning profile and finally refresh profiles in XCode). Anyway code signing is most annoying thing i find in doing iOS apps.

这意味着配置文件不包含您尝试运行该应用程序的手机的设备 ID。您提到的另一个答案看起来像是解决它的正确方法(转到 developer.apple.com 并在那里注册您的 iPhone,然后在配置文件中包含设备 ID,最后在 XCode 中刷新配置文件)。无论如何,代码签名是我在做 iOS 应用程序时发现的最烦人的事情。