Preparing an unsigned Xcarchive

2019-04-14 13:37发布

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?

标签: ios xcode xcode5
3条回答
女痞
2楼-- · 2019-04-14 14:26

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.

查看更多
干净又极端
3楼-- · 2019-04-14 14:26

You may help this Question also, check that.

查看更多
对你真心纯属浪费
4楼-- · 2019-04-14 14:29

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.

查看更多
登录 后发表回答