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:
- Load the provisioning profile onto your system
- In your project, choose the provisioning profile under the target's
"Build Settings" within the "Provisioning Profile" section
- Do not choose a Code Signing Identity
- Run, Product->Archive
- 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?
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.
Was able to do this using the following technique:
- Create an In House Distribution provisioning file through developer.apple.com
- Choose whatever AppID is going to be associated with this profile (or the wildcard one)
- Select a Distribution certificate to include in the profile
- 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)
-
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"
- Under the Code Signing section in your project's build settings do the following:
- 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
- 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.
You may help this Question also, check that.