Joined May 2017
·

Ubeamus

·

First, thanks for this post, it really helped me. But as some others i still run into the problem while signing an app. My iPhone did not installing the app and threw an errors concerning wrong signing. My goal was to sign an app that was originally not developed by myself.

Perform all the steps above, until the step where you actually have to sign the app (codesign -f -s "iPhone ...").

We need to create an entitlements.xml where the Bundle Identifier matches what you want to sign.

Retrieve entitlements from the app (In case there is no entitlements in the App, create an xCode Projekt and retrieve the entitlements from there.)

codesign -d --entitlements entitlements.xml Example.app/Example

This entitlements.xml has some strange characters at the beginning, looks like some integrity check (CRC?) just remove it. That the file actually starts with <xml

Now change the bundle identifier to the one of your App: com.example.AppName The important step here, leave the AppName as it is, or if it does not match the App name, rename it that it does. (See exammple below to get an idea what to do)

This step will replace the codesign step from above:

codesign --entitlements entitlements.xml -f -s "iPhone Distribution: Company Certificate" Payload/Example.app/

Now do the last step above and zip the app.

Example entitlements.xml

ABCDEFGHIJ = apple developer team identifier
com.example.AppName = bundle identifier com.example needs to match your developer identifier, AppName the identifier of the app

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>application-identifier</key>
        <string>ABCDEFGHIJ.com.example.AppName</string>
        <key>com.apple.developer.team-identifier</key>
        <string>ABCDEFGHIJ</string>
        <key>get-task-allow</key>
        <true/>
        <key>keychain-access-groups</key>
        <array>
                <string>ABCDEFGHIJ.com.example.AppName</string>
        </array>
</dict>
</plist>
Achievements
1 Karma
0 Total ProTip Views