Preparing an unsigned Xcarchive

亡梦爱人 提交于 2019-12-21 20:50:19

问题


TLDR; Question: Is there a way to prepare a an XArchive that they can then assign a provisioning profile themselves and sign using an appropriate distribution certificate?

Long Question: My client sent me a provisioning profile for an app I'm developing for them. They don't want to send me their Distribution Certificate (.p12 file).

The instructions they gave me are as follows:

  1. Load the provisioning profile onto your system
  2. In your project, choose the provisioning profile under the target's "Build Settings" within the "Provisioning Profile" section
  3. Do not choose a Code Signing Identity
  4. Run, Product->Archive
  5. Choose "Export as XCode Archive" when given the option to Distribute

The problem is, when executing step 4, I get the following error:

CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'

Their thought was they would codesign the app on their side (thus protecting their certificate). Is there a way to do that?


回答1:


Using xcodebuild command in terminal worked for me.

xcodebuild -project MyApp.xcodeproj -scheme MyApp -configuration Release clean archive -archivePath “buildArchive/MyApp.xcarchive" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO

This created an unsigned archive "MyApp.xcarchive" in "buildArchive" sub-directory of my project's root directory.




回答2:


Was able to do this using the following technique:

  1. Create an In House Distribution provisioning file through developer.apple.com
  2. Choose whatever AppID is going to be associated with this profile (or the wildcard one)
  3. Select a Distribution certificate to include in the profile
  4. Install both the certificate and provisioning profile on your computer by downloading them and double clicking on them (or if using XCode 5 you can do that through the Accounts preferences pane by refreshing)
  5. Most important: Create an "Entitlements.plist" file in your project, have it assigned to your "Supporting Files" group for good measure. Add a key to this file and from the dropdown list of keynames pick "get-task-allow" or "Can be debugged" (it depends on whether or not your plist editor is showing raw key values). The value should be "NO"
  6. Under the Code Signing section in your project's build settings do the following:
    1. In the Code Signing Entitlements setting type the relative path from where your .xcodeproj file resides to where the Entitlements.plist exists. For instance, if your .xcodeproj file resides in a folder that has a subfolder named "MyApp" and your Entitlements.plist file exists in the "MyApp" folder, you'd set the value to: MyApp/Entitlements.plist
    2. Select the provisioning profile under and certificate under the Code Signing section

Voila, build your Xcarchive via the Product->Archive and give it to your client, they'll be able to re-sign it with their own profile and certificate.




回答3:


You may help this Question also, check that.



来源:https://stackoverflow.com/questions/21117375/preparing-an-unsigned-xcarchive

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