7 个版本
0.0.15 | 2024 年 5 月 16 日 |
---|---|
0.0.14 | 2024 年 5 月 16 日 |
0.0.12 | 2024 年 3 月 21 日 |
#910 在 解析实现
每月 70 次下载
110KB
3K SLoC
Apple-CLIs
用于文档和类型安全目的,封装各种 Apple 命令行工具的 crate 集合。
这是一个正在进行中的项目,随着我需要为构建 100% Rust 的 iOS 应用添加更多功能,将会不断增加。
CLI 安装
crates.io 版本可能落后于开发分支,但更有可能正常工作。
# install from crates.io if it works
cargo install apple-clis
从源安装
# install from git if crates.io doesn't work / missing features
cargo install --git https://github.com/ActuallyHappening/Apple-CLIs.git apple-clis
使用 NuShell 设置
如果您想为您的 shell 添加补全,请创建一个 issue / PR,我会添加它。由于我使用 NuShell(它真的很棒,是用 Rust 构建的),我已经添加了一个命令来自动为 NuShell 添加补全。
# if you are using nushell,
apple-clis init nushell --auto
# if you want more control,
apple-clis init nushell --raw-script
运行 Rust 示例
# clone repo
git clone https://github.com/ActuallyHappening/Apple-CLIs.git
cd Apple-CLIs
cargo run --example ios-deploy-detect
cargo run --example security-find-certificates
cargo run --example simctl
使用 NuShell 的示例
Ios-Deploy 检测
apple-clis ios-deploy detect --json | from json
cargo run --example ios-deploy-detect
xcrun simctl list
apple-clis xcrun simctl list --json | from json | get device_type_identifier
示例构建脚本
此脚本使用 cargo bundle
,您可以使用 cargo install cargo-bundle
安装,以及 nushell,作为构建 iOS 应用的示例脚本。
# example Cargo.toml
# [package.metadata.bundle]
# identifier = "com.example-id"
let BUNDLE_ID = open Cargo.toml | get package.metadata.bundle.identifier | to text
cargo bundle --target aarch64-apple-ios-sim
apple-clis codesign sign --glob
apple-clis xcrun simctl boot --ipad
apple-clis open --well-known simulator
apple-clis xcrun simctl install --booted --glob
apple-clis xcrun simctl launch --booted --bundle-id $BUNDLE_ID
贡献
欢迎 PR!
开发中
# try the crates.io release if it works
cargo install --git https://github.com/burtonageo/cargo-bundle.git
brew install ios-deploy
cargo install nu # nushell is really awesome
# build an example bundle from the included example project + run tests
nu test.nu
依赖关系
~11–24MB
~349K SLoC