一款使用 Swift 编写的 macOS 实用程序,使用 AppStoreConnectAPI 生成应用程序大小图

⚖️ Steelyard

概述

Steelyard 是一款用于生成与应用大小演进相关的图表的新工具。


安装

Homebrew(推荐)

如欲使用 Homebrew 安装 Steelyard,请运行以下命令:

brew install mcrollin/steelyard/steelyard

Mint

如欲使用 Mint 安装,请运行:

mint install mcrollin/Steelyard

手动安装

或者,您可手动编译此工具:

swift build -c release --disable-sandbox --product steelyard

或者运行它:

swift run steelyard

先决条件

若要使用 Steelyard,您需要提供从 Apple 开发者门户获得的一些详细信息。

请按照以下步骤创建 API 密钥并检索必要的信息。

步骤 1:创建 API 密钥

  1. 前往 App Store Connect > 用户和访问 > 密钥 > App Store Connect API
  2. 点击 + 按钮新建密钥。
  3. 为密钥命名,选择开发者(或更高)访问角色并生成密钥。
  4. 下载生成的 .p8 文件。

注意:将此文件存储在安全的地方,因为您无法再次下载它。

步骤 2:检索密钥和发行者 ID

  1. 在列表中,找到您的密钥,将鼠标悬停在密钥 ID 上,然后点击复制密钥 ID按钮。
  2. 带有复制按钮的发行者 ID 就在密钥列表正上方,在用户和访问部分下方。

步骤 3:找到私钥路径

私钥路径是您存储已下载的 .p8 文件的位置。

步骤 4:找到您的应用 ID

您可在 App Store Connect > 应用 > 常规 > 应用信息 > 基本信息 > Apple ID 中找到应用 ID。


命令

生成图表

graph

要生成图表,您需要提供几个参数,如key-idissuer-idprivate-key-pathapp-id。命令格式如下:

USAGE: steelyard graph <key-id> <issuer-id> <private-key-path> <app-id> [--verbose] [--open-output] [--limit <limit>] [--reference-device-identifier <reference-device-identifier>]

ARGUMENTS:
  <key-id>                The key ID from the Apple Developer portal.
  <issuer-id>             The issuer ID from the App Store Connect organization.
  <private-key-path>      The path to the .p8 private key file.
  <app-id>                The App ID.

OPTIONS:
  -v, --verbose           Display all information messages.
  -o, --open-output       Open the result graphs.
  -l, --limit <limit>     The number of builds to process, between 0 and 200. (default: 30)
  --reference-device-identifier <reference-device-identifier>
                          The reference device to highlight in the charts. (default: iPhone12,1)
  -h, --help              Show help information.

了解更多信息,请运行:

steelyard graph --help

许可

本项目采用 MIT 许可协议授权。

GitHub

点击跳转