XCode 分发配置文件的问题

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

Problem with XCode Distribution Provisioning Profile

xcodedistributionprofileprovisioning

提问by digitalDrifter

I'm having a problem with a Distribution Provisioning Profile in XCode. After an entire day of reading and following the iOS Provisioning Portal, and googling the issue extensively, I'm looking for help please.

我在 XCode 中的分发配置文件有问题。经过一整天的阅读和关注 iOS 配置门户,并在谷歌上广泛搜索该问题,我正在寻求帮助。

It appears to me that I must satisfy the following conditions in order to distribute an app on the App Store: 1) I must target a DEVICE (i.e. not a simulator) in my build. 2) The targeted device must be configured in the XCode Organizer with a Distribution Provisioning Profile.

在我看来,我必须满足以下条件才能在 App Store 上分发应用程序:1) 我必须在我的构建中针对设备(即不是模拟器)。2) 目标设备必须在 XCode Organizer 中使用分发配置文件进行配置。

But I can't seem to satisfy these conditions through the Provisioning Portal, based on what I've experienced so far:

但根据我目前所经历的情况,我似乎无法通过 Provisioning Portal 满足这些条件:

1) I created a Distribution Provisioning Profile. 2) It indicates zero devices. 3) When I attempt to edit it, Devices are grayed out when "App Store" is selected as the "Distribution Method", but not when "Ad Hoc" is selected. So I can't add devices for App Store distribution. 4) I downloaded the Distribution Provisioning Profile (.mobileprovision file). 5) In XCode's Organizer, when I attempt to add a Provisioning Profile to my device, the Distribution Provisioning Profile that I downloaded is grayed out.

1) 我创建了一个分发配置文件。2) 表示零设备。3) When I attempt to edit it, Devices are grayed out when "App Store" is selected as the "Distribution Method", but not when "Ad Hoc" is selected. 所以我无法为 App Store 分发添加设备。4) 我下载了分发配置文件(.mobileprovision 文件)。5) 在 XCode 的管理器中,当我尝试将配置文件添加到我的设备时,我下载的分发配置文件是灰色的。

I'm concerned that the Distribution Provisioning Profile indicates zero devices. Is it because only Development Provisioning Profiles can indicate devices?

我担心分发配置文件指示零设备。是因为只有开发配置文件可以指示设备吗?

I'm also concerned that I can't add the Distribution Provisioning Profile that I downloaded to the device in the XCode Organizer. DEVELOPMENT Provisioning Profiles do not appear grayed out. Is that because only Development Provisioning Profiles may be added to a device?

我还担心无法在 XCode Organizer 中添加下载到设备的分发配置文件。开发配置文件不会显示为灰色。那是因为只能向设备添加开发配置文件吗?

When I do the build, I made sure that the Code Signing section specifies "iPhone Distribution", and indicates my Distribution Provisioning Profile. The build completes successfully, but I get the following error and the program will not run on the device:

当我进行构建时,我确保代码签名部分指定了“iPhone 分发”,并指明了我的分发配置文件。构建成功完成,但出现以下错误并且程序无法在设备上运行:

"a valid provisioning profile for this executable was not found"

“未找到此可执行文件的有效配置文件”

I must be missing something, as many other people have done this successfully. Can someone please point out what I am missing or doing wrong?

我一定遗漏了一些东西,因为许多其他人已经成功地做到了这一点。有人可以指出我遗漏了什么或做错了什么吗?

Any help is greatly appreciated.

任何帮助是极大的赞赏。

采纳答案by dasdom

Your second assumption is wrong. You don't have to target a device in the distribution profile. Unplug the devices from your computer, select the distribution profile and target iOS device in the scheme selector and build (without run). The result can then be zipped and uploaded to apple.

你的第二个假设是错误的。您不必以分发配置文件中的设备为目标。从计算机上拔下设备,在方案选择器中选择分发配置文件和目标 iOS 设备并构建(不运行)。然后可以将结果压缩并上传到苹果。