How to export ad-hoc archive using Xcode server

て烟熏妆下的殇ゞ 提交于 2019-12-08 02:25:41

问题


I’m using Xcode server (Xcode 9 beta 6) and defined a bot to archive and export an ad-hoc build using my ad-hoc provisioning profile. I have turned off automatic signing in the project and have defined arguments for xcodebuild in the bot Arguments window including DEVELOPMENT_TEAM, PROVISIONING_PROFILE, AD_HOC_CODE_SIGNING_ALLOWED, BUNDLE_ID, CODE_SIGN_IDENTITY and signingStyle.

When I run the integration the build succeeds and a valid archive is created but exporting fails with error saying the app ‘requires a provisioning profile’. Recovery suggestion is to ‘add a profile to the “provisioningProfiles” dictionary in your Export Options list’.

I added the “provisioningProfiles” dictionary in my exportOptions.plist but I don’t know how to get the bot to use that list? When I check the log at the end of the integration I see that the bot has created its own ExportOptions.plist that it is using. I see that the list is using method “same-as-archive” so I don’t know why it doesn’t know which profile to use.

I tried to add a pre-build script that copies my plist to the bot working space but the bot ignores it and overwrites the plist with its own file during integration.

I also tried to define a path to my exportOptions.plist on the bot Arguments list but that is ignored and the bot just uses its own plist for exporting.

What would be the way to tell the bot to use a certain exportOptions.plist? (And why would “same-as-archive” method not work?)


回答1:


This is what I did to get the bot make manually signed ad-hoc builds.

First did archive on Xcode and manually exported an ad-hoc build from Organizer. That way I could guarantee that the created ExportOptions.plist is a valid one.

Then I just told the bot to use this plist i.e. bot Configuration->Archive->Export->Use Custom Export Options Plist and selected the plist.

After that I still needed to set three items in the bot Arguments list (arguments passed to xcodebuild)
DEVELOPMENT_TEAM=Q76YSCRTM8
PROVISIONING_PROFILE=71bfe232-88e0-43a0-b9f5-f99fa87e09ee3
CODE_SIGN_IDENTITY="iPhone Distribution: My Company"




回答2:


Edit Bot -> Configuration -> Thick Archive and open Export titled drop-down list

Select Use Custom Export Options Plist

Then browse your ExportOptions.plist



来源:https://stackoverflow.com/questions/46125046/how-to-export-ad-hoc-archive-using-xcode-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!