👇👇关注后回复 “进群” ,拉你进程序员交流群👇👇

来源丨小集

https://mp.weixin.qq.com/s/89BXRtejOJbhuzt7xbIOAg

开发人员经常有这样一个需求,将目前应用的 ipa 包下载下来,做一些研究性工作。这里就给大家推荐一款开源的 ipa 下载工具:ipatool。ipatool 是一个命令行工具,可让您在 App Store 上搜索 iOS 应用程序并下载应用程序包的 ipa 文件。这个工具是用 Swift 开发的,目前在 Github 上有 1.6k 个 star 和 145 个 fork,最新版本是 1.0.8。

05475b503a477432c910bfeeea416b51.gif

这款开源工具需要运行在 macOS 10.15 或更高版本的系统上。同时需要设置 Apple ID 以使用 App Store。

安装

该工具可以通过手动和 Homebrew 两种方式来安装。如果选择手动安装,可以从 GitHub 版本(点击阅读原文进入 Github)中获取最新版本的 ipatool。如果使用 Homebrew 安装,可以使用以下命令:

$ brew tap majd/repo
$ brew install ipatool

使用

要在 App Store 上搜索应用程序,请使用搜索命令。

OVERVIEW: Search for iOS apps available on the App Store.

USAGE: ipatool search <term> [--limit <limit>] [--country <country>] [--device-family <device-family>] [--log-level <log-level>]

ARGUMENTS:
  <term>                  The term to search for. 

OPTIONS:
  -l, --limit <limit>     The maximum amount of search results to retrieve.
                          (default: 5)
  -c, --country <country> The two-letter (ISO 3166-1 alpha-2) country code for
                          the iTunes Store. (default: US)
  -d, --device-family <device-family>
                          The device family to limit the search query to.
                          (default: iPhone)
  --log-level <log-level> The log level. (default: info)
  --version               Show the version.
  -h, --help              Show help information.

要下载 ipa 文件的副本,请使用 download 命令。

OVERVIEW: Download (encrypted) iOS app packages from the App Store.

USAGE: ipatool download --bundle-identifier <bundle-identifier> [--email <email>] [--password <password>] [--auth-code <auth-code>] [--country <country>] [--device-family <device-family>] [--log-level <log-level>]

OPTIONS:
  -b, --bundle-identifier <bundle-identifier>
                          The bundle identifier of the target iOS app. 
  -e, --email <email>     The email address for the Apple ID. 
  -p, --password <password>
                          The password for the Apple ID. 
  --auth-code <auth-code> The 2FA code for the Apple ID. 
  -c, --country <country> The two-letter (ISO 3166-1 alpha-2) country code for the iTunes Store. (default: US)
  -d, --device-family <device-family>
                          The device family to limit the search query to. (default: iPhone)
  --log-level <log-level> The log level. (default: info)
  --version               Show the version.
  -h, --help              Show help information.

注意:您可以在使用该工具时将 Apple ID 电子邮件地址和用户名指定为参数,或者将它们设置为环境变量(IPATOOL_EMAIL 和 IPATOOL_PASSWORD)。如果您未使用其中任何一种方法指定此信息,则该工具将在交互式会话中提示用户输入。同样,您可以以交互方式或使用环境变量 IPATOOL_2FA_CODE 提供 2FA 代码。

常见疑问

在使用这款工具时,可能会有一些疑问,这里可以参考一下:

用户的 Apple ID 凭据是否安全存储?

该工具不会将用户的凭据存储在任何地方,它只会直接与 Apple 服务器通信。这个可以通过阅读源码查看。

用户的 Apple ID 会因为使用此工具而被标记吗?

也许,但可能不是。虽然这个工具直接与 iTunes 和 App Store 通信,模仿 iTunes 在 macOS 上运行的行为,但作者不能保证它的安全性。所以建议使用一次性 Apple ID。使用此工具需要用户自担风险。(所以,这个工具的参考意义可能大于实际意义)

用户可以使用此工具下载付费应用程序而无需付费吗?

不可以,这不是盗版工具;用户只能下载之前安装在 iOS 设备上的应用程序。此限制也适用于免费应用程序。本质上,用户的帐户必须已经拥有尝试下载的应用程序的许可证。

用户可以使用此工具在 Apple Silicon Mac 上加载不受支持的 iOS 应用程序吗?

虽然以前可以使用此工具下载 ipa 文件并将其安装在运行 Apple Silicon 的 Mac 上,但最近已不再是这种情况。Apple 停止为应用程序包提供 macOS 兼容的 sinf 数据。但是,用户可以使用此工具获取 iOS 应用程序的副本,并使用越狱的 iOS 设备去除任何代码签名要求,然后使用临时签名再次对应用程序进行代码签名以在 Apple Silicon 上运行。

-End-

最近有一些小伙伴,让我帮忙找一些 面试题 资料,于是我翻遍了收藏的 5T 资料后,汇总整理出来,可以说是程序员面试必备!所有资料都整理到网盘了,欢迎下载!

e1c2c6d2b0cafb72f66a6cbb2289da98.png

点击👆卡片,关注后回复【面试题】即可获取

在看点这里a0b0ff4f8e0695c433b1f23e36e6ce76.gif好文分享给更多人↓↓

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐