Skip to content
mahdi-ninjaPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

ipa-tools

Small macOS scripts for inspecting an .ipa, re-signing it with your own Apple Developer identity, and installing it onto a physical iOS device.

Script Purpose
ipa-info Inspect an IPA without modifying it
ipa-resign Re-sign an IPA, optionally changing its bundle identifier and display name
ipa-install Install an IPA onto a connected device via devicectl
ipa-uninstall Remove an installed app from a connected device

Only ipa-resign needs configuration. ipa-info reads everything from the IPA itself, and the two device tools use whatever is connected.

Requirements

  • macOS with Xcode installed (provides xcrun, devicectl, codesign)
  • A signing identity in your Keychain
  • A provisioning profile that covers the target device

ipa-install requires Xcode 15 or newer, since devicectl replaced the older ios-deploy style tooling.

Setup

Copy the example configuration and fill in your own values:

cp example.env .env

.env must define all three variables:

RESIGN_PROFILE="AdHoc_Local_Dev.mobileprovision"
RESIGN_IDENTITY="Apple Distribution: Your Company (TEAMID1234)"
RESIGN_BUNDLE_PREFIX="com.example"
  • RESIGN_PROFILE — path to a .mobileprovision file. A relative path is resolved against the directory containing ipa-resign, so keeping the profile next to the script and using a bare filename works.
  • RESIGN_IDENTITY — must match an identity from security find-identity -v -p codesigning.
  • RESIGN_BUNDLE_PREFIX — offered as a prefix option when choosing a new bundle identifier.

.env is sourced as shell script, so it is read as trusted local configuration. It is gitignored, along with *.mobileprovision and *.ipa.

Make the scripts executable and put them on your PATH:

chmod +x ipa-info ipa-resign ipa-install ipa-uninstall
for t in ipa-info ipa-resign ipa-install ipa-uninstall; do
    ln -s "$PWD/$t" "/usr/local/bin/$t"
done

Usage

ipa-info

ipa-info <file.ipa>

Prints the bundle identifier, version, minimum iOS version, architectures, extensions, frameworks, code signature and embedded provisioning profile — including how many days before the profile expires. Read-only, and needs no configuration.

Sections with nothing to report are omitted, so an unsigned build or one without an embedded profile prints cleanly rather than erroring.

ipa-resign

ipa-resign <input.ipa> [output.ipa]

Defaults to writing <input>-resigned.ipa alongside the input.

The script prompts for a bundle identifier (keep the existing one, add your configured prefix, or enter a custom one) and a display name, then re-signs every nested dylib, framework, extension and the app itself. It requires an interactive terminal.

Entitlements are regenerated from the provisioning profile, so anything the profile does not grant is dropped. The chosen identifier is validated against the profile's App ID before any signing happens.

The script refuses to continue if the IPA contains a Watch app or an encrypted App Store binary — neither can be re-signed this way.

ipa-install

ipa-install <file.ipa> [device-search]

Examples:

ipa-install App.ipa
ipa-install App.ipa "iPhone 17"
ipa-install App.ipa 265E6D75

The optional search term is matched case-insensitively against the whole devicectl device row, so a name, hostname, model or identifier fragment all work. With exactly one match the device is selected automatically; with several you are prompted to choose.

The device must be unlocked, and it must be included in the provisioning profile used to sign the IPA.

ipa-uninstall

ipa-uninstall <bundle-id|file.ipa> [device-search] [--yes]

Examples:

ipa-uninstall com.example.app
ipa-uninstall App.ipa
ipa-uninstall com.example.app "iPhone 17" --yes

Accepts either a bundle identifier or an .ipa to read the identifier from, so you can uninstall using the same file you installed. Device selection works exactly as in ipa-install.

The app must actually be installed — if it isn't, the installed bundle identifiers are listed instead. Because uninstalling also deletes the app's data, it prompts for confirmation and defaults to no. Pass --yes to skip the prompt.

Notes

  • Signatures use --timestamp=none, which is appropriate for local sideloading but not for anything longer-lived.
  • Re-signing rewrites keychain-access-groups to a single group based on the new root bundle identifier, keeping the app and its extensions in a shared group.
  • Signing an IPA whose extensions live below the main bundle identifier needs a wildcard provisioning profile. An explicit App ID only ever covers the main app.
  • These tools re-sign with your own Apple Developer identity, which is intended for your own builds and for apps you are otherwise entitled to sign. Encrypted App Store binaries are rejected outright.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages