简体   繁体   English

将 mobileprovision 文件添加到 Xcode

[英]Add mobileprovision file to Xcode

I know this is simple, but I've read through all the questions and there doesn't seem to be a simple answer to this.我知道这很简单,但我已经通读了所有问题,似乎没有一个简单的答案。

I've created an appID.我创建了一个 appID。 I've created a mobileprovision file, downloaded it and double clicked it and that all seems fine.我创建了一个 mobileprovision 文件,下载并双击它,一切似乎都很好。

How do I get this profile though to show up in XCode?我如何获得此配置文件以显示在 XCode 中? and where would it show up?它会出现在哪里?

using latest version of iOS and XCode.使用最新版本的 iOS 和 XCode。


It's appearing, evidently it just takes time to appear.它正在出现,显然需要时间才能出现。

Open Organizer in Xcode (Window -> Organizer), go to the Devices tab and select Provisioning Profiles in the left drawer.在 Xcode 中打开 Organizer(Window -> Organizer),转到 Devices 选项卡并在左侧抽屉中选择 Provisioning Profiles。 Then use the Refresh button on the bottom right.然后使用右下角的刷新按钮。

Update 2018 2018 年更新

From @mikeLspohn comment: Go to Window > Devices then right-click on your device and select Show Provisioning Profiles... from there you can click on +/- to add or remove profiles -来自@mikeLspohn 的评论:转到“窗口”>“设备”,然后右键单击您的设备并选择“显示配置文件...”,您可以从那里单击 +/- 以添加或删除配置文件 -

Two steps:两个步骤:

  1. First drag it onto iTunes.首先将它拖到 iTunes 上。 Dropping a.mobileProvision onto iTunes will install it in ~/Library/MobileDevice/Provisioning Profiles where it is supposed to go.将 a.mobileProvision 拖放到 iTunes 上会将其安装在它应该去的~/Library/MobileDevice/Provisioning Profiles中。

  2. Second double-click on.mobileProvision to add it to the Xcode store.第二次双击 on.mobileProvision 将其添加到 Xcode 商店。

It doesn't hurt to relaunch Xcode after that.之后重新启动 Xcode 也没什么坏处。

You can always just drag the file onto the Xcode dock icon.您始终可以将文件拖到 Xcode 停靠栏图标上。 This will add it to Xcode's store.这会将它添加到 Xcode 的商店。 When your target has the correct bundle ID and you have the private key, you should be able to select the appropriate profile and signing identity in the Code Signing build settings.当您的目标具有正确的包 ID 并且您拥有私钥时,您应该能够在代码签名构建设置中选择适当的配置文件和签名身份。

In XCode 12.2, click Window in the menu > Devices and Simulators在 XCode 12.2 中,单击菜单中的Window > Devices and Simulators

Right click you device, and select Show Provisioning Profiles...右键单击您的设备,然后选择显示配置文件...

在此处输入图像描述

Then click "+" to add your .mobileprovision files.然后单击“+”添加您的.mobileprovision文件。

在此处输入图像描述

UPDATE:更新:

The method above added mobileprovision files and shows in Xcode UI.上面的方法添加了 mobileprovision 文件并显示在 Xcode UI 中。 However, it does not add to但是,它不会增加

/Users/myusername/Library/MobileDevice/Provisioning Profiles

And when I build from Xcode, it still says the mobileprovision files are missing.当我从 Xcode 构建时,它仍然说缺少 mobileprovision 文件。

And the end, I found I only need to double click each mobileprovision file to add them under the folder of最后,我发现我只需要双击每个mobileprovision文件就可以将它们添加到文件夹下

/Users/myusername/Library/MobileDevice/Provisioning Profiles

And my Xcode has no issue building this time.这次我的 Xcode 构建没有问题。

Xcode 12.3 Xcode 12.3

  • Select your project in the navigator在导航器中选择您的项目
  • Select your target选择你的目标
  • Select Signing and Capabilities选择签名和功能
  • Uncheck the Automatically Manage Signing Box取消选中自动管理签名框

You will then see a dropdown to select a provisioning profile.然后您将看到一个下拉菜单以选择配置文件。 You can 'download' directly from Apple, assuming you've set up the profile on the developer site.假设您已经在开发者网站上设置了配置文件,您可以直接从 Apple“下载”。 Or you can 'Import' a file you've downloaded separately.或者您可以“导入”您单独下载的文件。

  • Now, check the Automatic Signing box again.现在,再次选中自动签名框。

I am not sure if this is necessary, but as Hongbo Miao has pointed out, you can download the file and double click it to 'add it to the library'.我不确定这是否有必要,但正如 Hongbo Miao 指出的那样,您可以下载该文件并双击它以“将其添加到库中”。

Go to http://developer.apple.com in Safari on your device and navigate to the SDK/downloads section.在您设备上的 Safari 中转到http://developer.apple.com ,然后导航到 SDK/downloads 部分。 From that page, download the .mobileconfig file and when prompted, Install.从该页面下载.mobileconfig文件,并在出现提示时安装。 This will allow you to install beta builds when you go to Settings -> General -> Software Update.这将允许您在转到“设置”->“常规”->“软件更新”时安装测试版。

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

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