fastlane docs
终端操作
ruby版本要求2.0.0以上
查看版本号
houjianan:~> ruby -v
ruby 2.6.0preview2 (2018-05-31 trunk 63539) [x86_64-darwin17]
检查是否安装xcode 貌似只能检查在App Store安装的
xcode-select —install
安装fastlane
gem install fastlane -NV
进入项目目录
创建fastlane
fastlane init

[14:32:55]: What would you like to use fastlane for?
1\. 📸 Automate screenshots
2\. 👩✈️ Automate beta distribution to TestFlight
3\. 🚀 Automate App Store distribution
4\. 🛠 Manual setup - manually setup your project to automate your tasks
选择TestFlight(测试包 选择哪个都要改配置文件)
[14:34:06]: Please enter your Apple ID developer credentials
[14:34:06]: Apple ID Username:
输入开发者账号的用户名 然后回车
[14:35:10]: Do you want fastlane to create the App ID for you on the Apple Developer Portal? (y/n)
选择y
[14:36:21]: App Name: 输入App的名字
[14:36:34]: Would you like fastlane to create the App on App Store Connect for you? (y/n)
选择y
最后的结果
[14:36:59]: Creating new app 'GAFastlane' on App Store Connect
[14:37:03]: Ensuring version number
[14:37:03]: Successfully created new app 'GAFastlane' on App Store Connect with ID 1447340643
[14:37:04]: ✅ Successfully created app
蒲公英
创建蒲公英对应的fastlane
fastlane add_plugin pgyer
[14:40:04]: Should fastlane modify the Gemfile at path '/Users/houjianan/Desktop/GAFastlane/Gemfile'
for you? (y/n)
#选择y
蒲公英配置文件
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
# For a list of all available actions, check out
# https://docs.fastlane.tools/actions
# For a list of all available plugins, check out
# https://docs.fastlane.tools/plugins/available-plugins
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
#App Store
desc "上传新版本到 App Store"
lane :release do
# 增加build版本号
# increment_build_number
scheme_name="GAFastlane"
# 导出路径
output_directory="/Users/houjianan/Desktop/ipa"
#版本号
scheme_version="1.0.0.4"
#导出名称
output_name="#{scheme_name}_#{scheme_version}_#{Time.now.strftime('%Y%m%d%H%M%S')}.ipa"
gym(
export_method: "app-store", #这里填写导出方式
export_xcargs: "-allowProvisioningUpdates",
scheme: scheme_name,# target的名字
clean: true, # 在构建前先clean
output_directory: output_directory,
output_name: output_name,
)
# 上传AppStore
deliver(
submit_for_review: false # 提交审核
)
end
#svn
#蒲公英
lane :beta do
build_app(export_method: "development")
pgyer(api_key: "7885ff7b7db2ddb8d010ed0ffafb21e2", user_key: "c27276980b6d46de09ba3b6630ce7d5f")
end
end
执行打包
fastlane beta
结果-成功
[14:53:52]: Upload success. Visit this URL to see: https://www.pgyer.com/jfQU
[14:53:52]: fastlane.tools finished successfully 🎉
App Store
上传App Store
deliver
上传App Store并提交审核
deliver --ipa "App.ipa" --submit_for_review
[15:58:58]: Checking app for precheck rule violations
[15:59:07]: Reading in-app purchases. If you have a lot, this might take a while
[15:59:07]: You can disable IAP checking by setting the `include_in_app_purchases` flag to `false`
[15:59:09]: Done reading in-app purchases
[15:59:10]: ✅ Passed: No negative sentiment
[15:59:10]: ✅ Passed: No placeholder text
[15:59:10]: ✅ Passed: No mentioning competitors
[15:59:10]: ✅ Passed: No future functionality promises
[15:59:10]: ✅ Passed: No words indicating test content
[15:59:10]: ✅ Passed: No curse words
[15:59:10]: ✅ Passed: No words indicating your IAP is free
[15:59:10]: 😵 Failed: Incorrect, or missing copyright date-> using a copyright date that is any different from this current year, or missing a date
[15:59:10]: 😵 Failed: No broken urls-> unreachable URLs in app metadata
[15:59:10]: fastlane.tools finished successfully 🎉
网友评论