Skip to content

Instantly share code, notes, and snippets.

@WDUK
Last active September 5, 2024 12:52
Show Gist options
  • Save WDUK/4239548f76bd77b2c4b0 to your computer and use it in GitHub Desktop.
Save WDUK/4239548f76bd77b2c4b0 to your computer and use it in GitHub Desktop.

Revisions

  1. WDUK renamed this gist Apr 14, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. WDUK created this gist Apr 14, 2015.
    25 changes: 25 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    Here's what you do!

    1. Terminal: Unzip the ipa (it's just a zip file after all)
    unzip -q App.ipa

    1a, You will need to have the entitlements file, this information is needed during signing.
    codesign -d --entitlements :- "Payload/App.app"

    2. Terminal: This will produce a `Payload/` directory. Remove the existing code signature.
    rm -rf Payload/App.app/_CodeSignature

    3. Terminal: You'll need a valid provisioning profile. Copy this into the payload.
    cp <file>.mobileprovision Payload/App.app/embedded.mobileprovision

    Note: If you've had a provisioning profile setup by Xcode 5, they're at the location
    ~/Library/MobileDevice/Provisioning\ Profiles/

    4. Terminal: Now resign the application with your developer certificate.
    The certificate name needs to match what's listed within Keychain Access.
    /usr/bin/codesign -f -s "<Certificate Name>" --resource-rules Payload/App.app/ResourceRules.plist --entitlements Payload/App.app/Entitlements.plist Payload/App.app

    6. Terminal: Rezip the newly signed app
    zip -qr App.ipa Payload

    7. Xcode: Get your device in the Organizer, and drag the .ipa to the Applications section