6

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?

ThaDon
  • 7,826
  • 9
  • 52
  • 84
  • 1
    Erm..well yes..you can't code sign a distribution build without a distribution certificate. If you don't have access to their iTunes dev account to generate your own, they have to provide one. – GuybrushThreepwood Jan 14 '14 at 15:40

3 Answers3

5

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.

archeopetrix
  • 171
  • 4
  • 11
3

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.

ThaDon
  • 7,826
  • 9
  • 52
  • 84
  • 5
    This way I don't think you are creating an unsigned archive. Instead you are signing it with your own in-house distribution certificate. The client is then re-signin your signed binary with their own certificate. – archeopetrix Sep 21 '17 at 16:45
1

You may help this Question also, check that.

Isuru Jayathissa
  • 478
  • 4
  • 15