如何使用 altool 命令行工具上传 IPA 包:

找到 altool 工具的位置,路径为:/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/altool。

为了方便使用,可以在命令行中添加别名(alias),在 .zshrc 文件中添加以下代码,并运行 source ~/.zshrc,这样就可以在命令行中直接敲 altool -h 了:

alias altool="/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/altool"

验证 IPA 包,命令为:

altool -v -f /Users/xxx/test.ipa -u [email protected] -p YourPassword(app-specific) -t ios

注意,需要使用在 appleid.apple.com 中创建的专用密码(app-specific)。

上传 IPA 包,命令为:

altool --upload-app -f /Users/xxx/test.ipa -t ios -u [email protected] -p YourPassword(app-specific)

如果需要查看 altool 的版本信息,可以在命令行中输入以下命令:

altool -v

新版本 Xcode 11 中已经去掉了 Application Loader,此时可以使用 xcrun altool 命令行工具,命令和参数与上面的 altool 工具大致相同,具体可以参考 xcrun altool 的帮助文档。

猜你喜欢

转载自blog.csdn.net/weixin_46626339/article/details/129620599
今日推荐