ipatool 是一个命令行工具,允许你在 App Store 上搜索 iOS、iPadOS、tvOS 和 visionOS 应用,并下载应用包的副本,即 ipa 文件。

你可以从 GitHub releases 获取最新版本的 ipatool。
你可以使用 Homebrew 安装 ipatool。
$ brew install ipatool
要与 App Store 进行身份验证,请使用 auth 命令。
Authenticate with the App Store
Usage:
ipatool auth [command]
Available Commands:
info Show current account info
login Login to the App Store
revoke Revoke your App Store credentials
Flags:
-h, --help help for auth
Global Flags:
--format format sets output format for command; can be 'text', 'json' (default text)
--non-interactive run in non-interactive session
--verbose enables verbose logs
Use "ipatool auth [command] --help" for more information about a command.
要在 App Store 上搜索应用,请使用 search 命令。
Search for iOS, iPadOS, tvOS, and visionOS apps available on the App Store
Usage:
ipatool search <term> [flags]
Flags:
-h, --help help for search
-l, --limit int maximum amount of search results to retrieve; visionOS supports up to 12 (default 5)
--platform string Platform to search: iphone (iOS), ipad (iPadOS), appletv (tvOS), or visionos
Global Flags:
--format format sets output format for command; can be 'text', 'json' (default text)
--non-interactive run in non-interactive session
--verbose enables verbose logs
要获取应用的许可证,请使用 purchase 命令。
Obtain a license for the app from the App Store
Usage:
ipatool purchase [flags]
Flags:
-b, --bundle-identifier string Bundle identifier of the target iOS app (required)
-h, --help help for purchase
Global Flags:
--format format sets output format for command; can be 'text', 'json' (default text)
--non-interactive run in non-interactive session
--verbose enables verbose logs
要列出已认证账户拥有的应用,请使用 list-purchases 命令。结果按购买日期排序,最新的在前。
List apps owned by the authenticated App Store account
Usage:
ipatool list-purchases [flags]
Flags:
-h, --help help for list-purchases
-l, --max-results int maximum number of apps to return per page (default 10)
-p, --page int page of owned apps to return (default 1)
Global Flags:
--format format sets output format for command; can be 'text', 'json' (default text)
--keychain-passphrase string passphrase for unlocking keychain
--non-interactive run in non-interactive session
--verbose enables verbose logs
要获取可下载的应用版本列表,请使用 list-versions 命令。
List the available versions of an iOS app
Usage:
ipatool list-versions [flags]
Flags:
-i, --app-id int ID of the target iOS app (required)
-b, --bundle-identifier string The bundle identifier of the target iOS app (overrides the app ID)
-h, --help help for list-versions
Global Flags:
--format format sets output format for command; can be 'text', 'json' (default text)
--keychain-passphrase string passphrase for unlocking keychain
--non-interactive run in non-interactive session
--verbose enables verbose logs
要下载 ipa 文件的副本,请使用 download 命令。
Download (encrypted) iOS, iPadOS, tvOS, and visionOS app packages from the App Store
Usage:
ipatool download [flags]
Flags:
-i, --app-id int ID of the target app (required)
-b, --bundle-identifier string The bundle identifier of the target app (overrides the app ID)
--external-version-id string External version identifier of the target app (defaults to latest version when not specified)
-h, --help help for download
-o, --output string The destination path of the downloaded app package
--platform string Platform to download for: iphone (iOS), ipad (iPadOS), appletv (tvOS), or visionos
--purchase Obtain a license for the app if needed
Global Flags:
--format format sets output format for command; can be 'text', 'json' (default text)
--keychain-passphrase string passphrase for unlocking keychain
--non-interactive run in non-interactive session
--verbose enables verbose logs
要解析由 list-versions 命令返回的外部版本标识符,请使用 get-version-metadata 命令。
Retrieves the metadata for a specific version of an app
Usage:
ipatool get-version-metadata [flags]
Flags:
-i, --app-id int ID of the target iOS app (required)
-b, --bundle-identifier string The bundle identifier of the target iOS app (overrides the app ID)
--external-version-id string External version identifier of the target iOS app (required)
-h, --help help for get-version-metadata
Global Flags:
--format format sets output format for command; can be 'text', 'json' (default text)
--keychain-passphrase string passphrase for unlocking keychain
--non-interactive run in non-interactive session
--verbose enables verbose logs
注意: 该工具默认以交互模式运行。如果在自动化环境中运行,请使用 --non-interactive 标志。
该工具可以使用 Go 工具链进行编译。
$ go build -o ipatool
单元测试可以通过以下命令执行。
$ go generate ./...
$ go test -v ./...
IPATool 基于 MIT 许可证 发布。