简体   繁体   English

刷新由 Xcode 7 管理的团队配置文件中的设备?

[英]Refresh devices in team provisioning profile managed by Xcode 7?

It used to be that hitting the refresh arrow/loop button in preferences -> account would pull down a new provisioning profile with all ur new devices.过去,点击首选项中的刷新箭头/循环按钮 -> 帐户会下拉一个包含所有新设备的新配置文件。

Now it just downloads the ones you already have.现在它只下载你已经拥有的那些。 But if the one you need updated is managed by Xcode, theres's no way I can find to add a device to it!但是,如果您需要更新的设备是由 Xcode 管理的,我就找不到向其中添加设备的方法!

Here's what worked for me on Xcode 8 & 9.这是在 Xcode 8 和 9 上对我有用的方法。

  1. Add your device to developer.apple.com.将您的设备添加到 developer.apple.com。
  2. Go to your target's General tab and tap the (i) next to "Xcode Managed Profile", then drag the profile file icon in that popover to your desktop to get the filename of the provisioning profile.转到目标的“常规”选项卡,然后点击“Xcode Managed Profile”旁边的 (i),然后将该弹出窗口中的配置文件图标拖动到桌面以获取配置文件的文件名。 在此处输入图片说明
  3. Go to ~/Library/MobileDevice/Provisioning Profiles and delete the provisioning profile with the same filename that you got in #2.转到 ~/Library/MobileDevice/Provisioning Profiles 并删除与您在 #2 中获得的文件名相同的配置文件。
  4. Xcode should regenerate the profile for your app with the device added in #1. Xcode 应该使用在 #1 中添加的设备为您的应用程序重新生成配置文件。

My account on developer.apple.com was not showing any Xcode managed profiles so this was the only way to make it work.我在 developer.apple.com 上的帐户没有显示任何 Xcode 管理的配置文件,所以这是让它工作的唯一方法。

Simplest way:最简单的方法:

Remove the mobileprovision file using terminal使用终端删除mobileprovision文件

rm + drag the file path from xcode rm + 从 xcode 拖动文件路径

在此处输入图片说明

After adding the UDID in the member center I had the same issue.在会员中心添加 UDID 后,我遇到了同样的问题。 I have to say that I have a XCode managed iOS team development profile.我不得不说我有一个XCode 管理的iOS 团队开发配置文件。

eventually what's worked is deleting the provisioning profile from the member center.最终有效的是从会员中心删除配置文件。

in xcode preferences, delete the team provisioning profile for the relevant app在 xcode 首选项中,删除相关应用的团队配置文件

go to your target, you'll see a "Fix Issue" button.转到您的目标,您会看到“修复问题”按钮。 click it, it will generate a new provisioning profile with the relevant devices.单击它,它将使用相关设备生成新的配置文件。

Hope it helps.希望能帮助到你。

I also had this problem.我也有这个问题。 I am using Xcode 7.2 .我正在使用Xcode 7.2 Then its worked with following steps:然后它按照以下步骤工作:

  1. Add you new device UDID in the Member Center在会员中心添加您的新设备 UDID
  2. Take Xcode -> Preference...以 Xcode -> 首选项...
  3. Select account and press 'View Details...'选择帐户并按“查看详细信息...”
  4. Press 'Download All' button in bottom-left corner.按左下角的“全部下载”按钮。 New set of Team Provisioning Profiles will be downloaded.将下载一组新的团队供应配置文件。
  5. Now you can delete the old Team Provisioning Profiles from the list.现在您可以从列表中删除旧的团队供应配置文件。 (Right click -> Move to Trash) (右键单击 -> 移至废纸篓)
  6. Update Provisioning Profile in 'Build Settings' Tab在“构建设置”选项卡中更新配置文件
  7. Press 'Fix Issue' button in 'General' Tab按“常规”选项卡中的“修复问题”按钮

Now you can run the app in your new device.现在您可以在新设备上运行该应用程序。

Spent a lot of time trying to fix the same issue on Xcode 7 ie refreshing the Xcode managed provisioning profiles.花了很多时间尝试修复 Xcode 7 上的相同问题,即刷新 Xcode 管理的配置文件。

After adding the UDID in the member center, what worked for me was just removing the account from preferences -> account and adding it back again.在会员中心添加 UDID 后,对我有用的只是从首选项中删除帐户-> 帐户并重新添加它。 It updated all the provisioning profiles.它更新了所有配置文件。

Problem: Some time update devices in developer account, causes sometime not able reflect on our automatic management signing even update provisioning profile in xcode account.问题:有时在开发者帐户中更新设备,导致有时无法反映我们的自动管理签名甚至在 xcode 帐户中更新配置文件。

Solution: find provisioning profile folder and delete all provisioning.解决方案:找到provisioning profile文件夹并删除所有provisioning。 ~/Library/MobileDevice/Provisioning Profiles ~/Library/MobileDevice/Provisioning Profiles

Automatic management signing will create new one.自动管理签名将创建新的签名。 your devices will update in provisioning.您的设备将在配置中更新。

Update for Xcode 8 Xcode 8 更新

With Xcode 8 you don't need to add the device in the “Member Center” anymore and you can skip some annoying steps.使用 Xcode 8,您不再需要在“会员中心”中添加设备,您可以跳过一些烦人的步骤。

What you still have to do are the following steps:您仍然需要做的是以下步骤:

  1. Open “Xcode → Preferences…” ( , ).打开“Xcode → Preferences…”( , )。
  2. Select the corresponding “Apple ID” from the “Apple IDs” list in the left side of the window.从窗口左侧的“Apple ID”列表中选择相应的“Apple ID”。 Then select the corresponding “Team” from the list in the bottom right side of the window.然后从窗口右下角的列表中选择相应的“团队”。
  3. Click on “View Details…”, then click on “Download All Profiles”.单击“查看详细信息...”,然后单击“下载所有配置文件”。
  4. Close the “Preferences” window, select the scheme & affected devices and build your project.关闭“首选项”窗口,选择方案和受影响的设备并构建您的项目。 Eventually let Xcode automatically register the device.最终让Xcode自动注册设备。

I also couldn't find a way to delete or refresh the provisioning profile in Xcode.我也找不到删除或刷新 Xcode 中的配置文件的方法。

I managed to pull the provisioning profile with the new devices by quitting Xcode, deleting the Development provisioning profiles - the ones marked "Active (Managed by Xcode)" - on the Apple Developer site, then reopening Xcode and choosing the team in General settings for the app target.我设法通过退出 Xcode,删除开发配置文件(标记为“活动(由 Xcode 管理)”的开发配置文件)在 Apple 开发人员站点上使用新设备拉取配置文件,然后重新打开 Xcode 并在常规设置中选择团队应用程序目标。 Xcode recreated the profiles (as confirmed on the developer site) and the device was included. Xcode 重新创建了配置文件(已在开发人员网站上确认)并包含该设备。

I had a similiar problem and found the following - add a file called build.json in your root (same level as config.xml) with the following contents - replace the developmentTeam value with your Team Id as seen here https://developer.apple.com/account/#/membership/我有一个类似的问题,发现以下问题 - 在您的根目录中添加一个名为 build.json 的文件(与 config.xml 相同级别),其中包含以下内容 - 将 developmentTeam 值替换为您的团队 ID,如下所示https://developer。 apple.com/account/#/membership/

{
  "ios": {
    "debug": {
      "codeSignIdentity": "iPhone Developer",
      "developmentTeam": "DP7KW42777",
      "packageType": "development"
    },
    "release": {
      "codeSignIdentity": "iPhone Developer",
      "developmentTeam": "DP7KW42777",
      "packageType": "app-store"
    }
  }
}

I also found that by adding the following in config.xml under我还发现通过在config.xml下添加以下内容

<platform name="ios">

there was no need anymore to set various Info settings, for example hiding the status bar不再需要设置各种信息设置,例如隐藏状态栏

<config-file parent="NSBluetoothPeripheralUsageDescription" platform="ios" target="*-Info.plist">
  <string>${EXECUTABLE_NAME} requires bluetooth access to function properly</string>
</config-file>
<config-file parent="NSCalendarsUsageDescription" platform="ios" target="*-Info.plist">
<string>${EXECUTABLE_NAME} requires calendar access to function properly</string>
</config-file>
<config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
<string>${EXECUTABLE_NAME} requires camera access to function properly</string>
</config-file>
<config-file parent="NSContactsUsageDescription" platform="ios" target="*-Info.plist">
<string>${EXECUTABLE_NAME} requires contacts access to function properly</string>
</config-file>
<config-file parent="NSLocationAlwaysAndWhenInUseUsageDescription" platform="ios" target="*-Info.plist">
<string>${EXECUTABLE_NAME} would like to check your location when app is active or in background</string>
</config-file>
<config-file parent="NSLocationAlwaysUsageDescription" platform="ios" target="*-Info.plist">
<string>${EXECUTABLE_NAME} would like to check your location when app is active or in background</string>
</config-file>
<config-file parent="NSLocationWhenInUseUsageDescription" platform="ios" target="*-Info.plist">
<string>${EXECUTABLE_NAME} would like to check your location when app is active or in background</string>
</config-file>
<config-file parent="NSMicrophoneUsageDescription" platform="ios" target="*-Info.plist">
<string>${EXECUTABLE_NAME} requires microphone access to function properly</string>
</config-file>
<config-file parent="NSMotionUsageDescription" platform="ios" target="*-Info.plist">
<string>${EXECUTABLE_NAME} requires motion detection access to function properly</string>
</config-file>
<config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
<string>${EXECUTABLE_NAME} requires photo library access to function properly</string>
</config-file>
<config-file parent="NSRemindersUsageDescription" platform="ios" target="*-Info.plist">
<string>${EXECUTABLE_NAME} equires reminders access to function properly</string>
</config-file>
<config-file parent="UIStatusBarHidden" platform="ios" target="*-Info.plist">
<true/>
</config-file>
<config-file parent="UIViewControllerBasedStatusBarAppearance" platform="ios" target="*-Info.plist">
<false/>
</config-file>

and finally, by adding最后,通过添加

<icon height="1024" src="resources/ios/icon/AppIcon.png" width="1024" />

to the icons list, I no longer needed to manually add the 1024 icon.到图标列表,我不再需要手动添加 1024 图标。 So now all I do is build, archive and upload without having to change any settings.所以现在我所做的就是构建、存档和上传,而无需更改任何设置。 Hope this helps.希望这可以帮助。

  1. Remove old team provisioning profile from site.从站点中删除旧的团队配置文件。
  2. Remove all local provisioning profiles ( Xcode -> Preferences -> Accounts -> Select account -> Select team -> View details -> Right click any profile -> Show in finder -> Cmd+A -> Cmd+Backspace ).删除所有本地配置文件( Xcode -> Preferences -> Accounts -> Select account -> Select team -> View details -> Right click any profile -> Show in finder -> Cmd+A -> Cmd+Backspace )。
  3. Try build for device.尝试构建设备。

You will see fix button.您将看到修复按钮。

In my case nothing listed above helped on Xcode 8.就我而言,上面列出的任何内容都对 Xcode 8 没有帮助。

Here are the steps I tried, which eventually worked to allow Xcode to fix the problem by once again showing me the Register Device button:以下是我尝试过的步骤,最终通过再次向我显示“注册设备”按钮来让 Xcode 解决问题:

  • Removed apple id from Preferences > Accounts“首选项”>“帐户”中删除了 Apple id
  • Re-added apple id.重新添加了苹果ID。
  • Restarted Xcode重启Xcode

Sidenote: In my case I think the problem was that my login expired (Xcode told me this in Preferences > Accounts ).旁注:就我而言,我认为问题在于我的登录已过期(Xcode 在Preferences > Accounts 中告诉我这一点)。 But even after clicking on Sign In Again nothing worked.但即使在再次点击登录后也没有任何效果。 I think maybe all I had to do to refresh it was sign in again and restart Xcode for the Register Device(s) button to show.我想也许我所要做的就是重新登录并重新启动 Xcode 以显示“注册设备”按钮。

Add your new device id's in apple's console在苹果的控制台中添加您的新设备 ID

Simply go to your target settings and select the General tab只需转到您的目标设置并选择常规选项卡

Uncheck Automatically manage signing取消选中自动管理签名

Let Xcode complain and then re-enable the Automatically manage signing让 Xcode 抱怨然后重新启用自动管理签名

It should have all the new devices in the provisioning profile when you make a new archive创建新存档时,它应该在配置文件中包含所有新设备

Spent the last hour looking for a solution花了最后一个小时寻找解决方案

I unplugged my iPhone and now it works.我拔掉了我的 iPhone,现在它可以工作了。

I just downloaded the profile from Member Center and hit fix issue in XCode.我刚刚从会员中心下载了配置文件,并在 XCode 中解决了问题。

I'm on OSX 10.15 and XCode 11.3 beta.我使用的是 OSX 10.15 和 XCode 11.3 测试版。

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

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