Fastlane概况说明:
🚀 节省发布Release版本、Beta版本以及提交审核信息的时间成本
✨ 提供170多个功能和服务
📖 全部开源
🎩 安装便捷、使用方便
🖥 支持 iOS, Mac, Android
🔧 自由的扩展和定制Fastlane
💭 只需简单的操作fastlane命令,无需其他命令
Fastlane主要功能:
iOS Tools | |
---|---|
deliver | Upload screenshots, metadata and your app to the App Store using a single command. |
snapshot | Automate taking localized screenshots of your iOS app on every device |
frameit | Quickly put your screenshots into the right device frames |
pem | Automatically generate and renew your push notification profiles |
sign | Because you would rather spend your time building stuff than fighting provisioning |
produce | Create new iOS apps on iTunes Connect and Developer Portal using the command line |
cert | Automatically create and maintain iOS code signing certificates |
scan | The easiest way to run tests of your iOS and Mac app |
gem | Building your iOS app has never been easier |
match | Easily sync your certificates and profiles across your team using Gi |
precheck | Check your app using a community driven set of App Store review rules to avoid being rejected |
iOS TestFlight Tools | |
---|---|
pilot | The best way to manage your TestFlight testers and builds from your terminal |
boarding | Instantly create a simple signup page for TestFlight beta testers |
Android Tools | |
---|---|
Supply | Command line tool for updating Android apps and their metadata on the Google Play Store |
screengrab | Automate taking localized screenshots of your Android app on every device |
安装fastlane
1、首先要安装正确的 Ruby 版本。在终端窗口中用下列命令来确认:
ruby -v
2、然后检查 Xcode 命令行工具是否安装。在终端窗口中输入命令:
xcode-select --install
3、以上依赖配置好之后就可以通过 rubygem 进行安装了
sudo gem install fastlane
结果如下:
Fetching: slack-notifier-1.5.1.gem (100%)
Successfully installed slack-notifier-1.5.1
Fetching: rouge-2.0.7.gem (100%)
Successfully installed rouge-2.0.7
Fetching: xcpretty-0.2.8.gem (100%)
Successfully installed xcpretty-0.2.8
Fetching: terminal-notifier-1.8.0.gem (100%)
Successfully installed terminal-notifier-1.8.0
Fetching: unicode-display_width-1.3.0.gem (100%)
Successfully installed unicode-display_width-1.3.0
Fetching: terminal-table-1.8.0.gem (100%)
Successfully installed terminal-table-1.8.0
Fetching: plist-3.3.0.gem (100%)
Successfully installed plist-3.3.0
Fetching: public_suffix-2.0.5.gem (100%)
Successfully installed public_suffix-2.0.5
Fetching: addressable-2.5.2.gem (100%)
Successfully installed addressable-2.5.2
Fetching: multipart-post-2.0.0.gem (100%)
Successfully installed multipart-post-2.0.0
Fetching: word_wrap-1.0.0.gem (100%)
Successfully installed word_wrap-1.0.0
Fetching: tty-screen-0.5.1.gem (100%)
Successfully installed tty-screen-0.5.1
Fetching: babosa-1.0.2.gem (100%)
Successfully installed babosa-1.0.2
Fetching: colored-1.2.gem (100%)
Successfully installed colored-1.2
Fetching: highline-1.7.8.gem (100%)
Successfully installed highline-1.7.8
Fetching: commander-fastlane-4.4.5.gem (100%)
Successfully installed commander-fastlane-4.4.5
Fetching: excon-0.59.0.gem (100%)
Successfully installed excon-0.59.0
Fetching: unf_ext-0.0.7.4.gem (100%)
Building native extensions. This could take a while...
Successfully installed unf_ext-0.0.7.4
Fetching: unf-0.1.4.gem (100%)
Successfully installed unf-0.1.4
Fetching: domain_name-0.5.20170404.gem (100%)
Successfully installed domain_name-0.5.20170404
Fetching: http-cookie-1.0.3.gem (100%)
Successfully installed http-cookie-1.0.3
Fetching: faraday-0.13.1.gem (100%)
Successfully installed faraday-0.13.1
Fetching: faraday-cookie_jar-0.0.6.gem (100%)
Successfully installed faraday-cookie_jar-0.0.6
Fetching: fastimage-2.1.0.gem (100%)
Successfully installed fastimage-2.1.0
Fetching: mini_magick-4.5.1.gem (100%)
Successfully installed mini_magick-4.5.1
Fetching: multi_json-1.12.2.gem (100%)
Successfully installed multi_json-1.12.2
Fetching: multi_xml-0.6.0.gem (100%)
Successfully installed multi_xml-0.6.0
Fetching: rubyzip-1.2.1.gem (100%)
Successfully installed rubyzip-1.2.1
Fetching: security-0.1.3.gem (100%)
Successfully installed security-0.1.3
Fetching: xcpretty-travis-formatter-1.0.0.gem (100%)
Successfully installed xcpretty-travis-formatter-1.0.0
Fetching: dotenv-2.2.1.gem (100%)
Successfully installed dotenv-2.2.1
Fetching: bundler-1.15.4.gem (100%)
Successfully installed bundler-1.15.4
Fetching: faraday_middleware-0.12.2.gem (100%)
Successfully installed faraday_middleware-0.12.2
Fetching: uber-0.1.0.gem (100%)
Successfully installed uber-0.1.0
Fetching: declarative-0.0.10.gem (100%)
Successfully installed declarative-0.0.10
Fetching: declarative-option-0.1.0.gem (100%)
Successfully installed declarative-option-0.1.0
Fetching: representable-3.0.4.gem (100%)
Successfully installed representable-3.0.4
Fetching: retriable-3.1.1.gem (100%)
Successfully installed retriable-3.1.1
Fetching: mime-types-data-3.2016.0521.gem (100%)
Successfully installed mime-types-data-3.2016.0521
Fetching: mime-types-3.1.gem (100%)
Successfully installed mime-types-3.1
Fetching: little-plugger-1.1.4.gem (100%)
Successfully installed little-plugger-1.1.4
Fetching: logging-2.2.2.gem (100%)
Successfully installed logging-2.2.2
Fetching: jwt-2.1.0.gem (100%)
Successfully installed jwt-2.1.0
Fetching: memoist-0.16.0.gem (100%)
Successfully installed memoist-0.16.0
Fetching: os-0.9.6.gem (100%)
Successfully installed os-0.9.6
Fetching: signet-0.8.1.gem (100%)
Successfully installed signet-0.8.1
Fetching: googleauth-0.6.1.gem (100%)
Successfully installed googleauth-0.6.1
Fetching: httpclient-2.8.3.gem (100%)
Successfully installed httpclient-2.8.3
Fetching: google-api-client-0.13.6.gem (100%)
Successfully installed google-api-client-0.13.6
Fetching: fastlane-2.62.1.gem (100%)
Successfully installed fastlane-2.62.1
Parsing documentation for slack-notifier-1.5.1
Installing ri documentation for slack-notifier-1.5.1
Parsing documentation for rouge-2.0.7
Installing ri documentation for rouge-2.0.7
Parsing documentation for xcpretty-0.2.8
Installing ri documentation for xcpretty-0.2.8
Parsing documentation for terminal-notifier-1.8.0
Installing ri documentation for terminal-notifier-1.8.0
Parsing documentation for unicode-display_width-1.3.0
Installing ri documentation for unicode-display_width-1.3.0
Parsing documentation for terminal-table-1.8.0
Installing ri documentation for terminal-table-1.8.0
Parsing documentation for plist-3.3.0
Installing ri documentation for plist-3.3.0
Parsing documentation for public_suffix-2.0.5
Installing ri documentation for public_suffix-2.0.5
Parsing documentation for addressable-2.5.2
Installing ri documentation for addressable-2.5.2
invalid options: -SHN
(invalid options are ignored)
Parsing documentation for multipart-post-2.0.0
Installing ri documentation for multipart-post-2.0.0
Parsing documentation for word_wrap-1.0.0
Installing ri documentation for word_wrap-1.0.0
Parsing documentation for tty-screen-0.5.1
Installing ri documentation for tty-screen-0.5.1
Parsing documentation for babosa-1.0.2
Installing ri documentation for babosa-1.0.2
Parsing documentation for colored-1.2
Installing ri documentation for colored-1.2
Parsing documentation for highline-1.7.8
Installing ri documentation for highline-1.7.8
Parsing documentation for commander-fastlane-4.4.5
Installing ri documentation for commander-fastlane-4.4.5
Parsing documentation for excon-0.59.0
Installing ri documentation for excon-0.59.0
Parsing documentation for unf_ext-0.0.7.4
Installing ri documentation for unf_ext-0.0.7.4
Parsing documentation for unf-0.1.4
Installing ri documentation for unf-0.1.4
Parsing documentation for domain_name-0.5.20170404
Installing ri documentation for domain_name-0.5.20170404
Parsing documentation for http-cookie-1.0.3
Installing ri documentation for http-cookie-1.0.3
Parsing documentation for faraday-0.13.1
Installing ri documentation for faraday-0.13.1
Parsing documentation for faraday-cookie_jar-0.0.6
Installing ri documentation for faraday-cookie_jar-0.0.6
Parsing documentation for fastimage-2.1.0
Installing ri documentation for fastimage-2.1.0
Parsing documentation for mini_magick-4.5.1
Installing ri documentation for mini_magick-4.5.1
Parsing documentation for multi_json-1.12.2
Installing ri documentation for multi_json-1.12.2
Parsing documentation for multi_xml-0.6.0
Installing ri documentation for multi_xml-0.6.0
Parsing documentation for rubyzip-1.2.1
Installing ri documentation for rubyzip-1.2.1
Parsing documentation for security-0.1.3
Installing ri documentation for security-0.1.3
Parsing documentation for xcpretty-travis-formatter-1.0.0
Installing ri documentation for xcpretty-travis-formatter-1.0.0
Parsing documentation for dotenv-2.2.1
Installing ri documentation for dotenv-2.2.1
Parsing documentation for bundler-1.15.4
Installing ri documentation for bundler-1.15.4
Parsing documentation for faraday_middleware-0.12.2
Installing ri documentation for faraday_middleware-0.12.2
Parsing documentation for uber-0.1.0
Installing ri documentation for uber-0.1.0
Parsing documentation for declarative-0.0.10
Installing ri documentation for declarative-0.0.10
Parsing documentation for declarative-option-0.1.0
Installing ri documentation for declarative-option-0.1.0
Parsing documentation for representable-3.0.4
Installing ri documentation for representable-3.0.4
Parsing documentation for retriable-3.1.1
Installing ri documentation for retriable-3.1.1
Parsing documentation for mime-types-data-3.2016.0521
Installing ri documentation for mime-types-data-3.2016.0521
Parsing documentation for mime-types-3.1
Installing ri documentation for mime-types-3.1
Parsing documentation for little-plugger-1.1.4
Installing ri documentation for little-plugger-1.1.4
Parsing documentation for logging-2.2.2
Installing ri documentation for logging-2.2.2
Parsing documentation for jwt-2.1.0
Installing ri documentation for jwt-2.1.0
Parsing documentation for memoist-0.16.0
Installing ri documentation for memoist-0.16.0
Parsing documentation for os-0.9.6
Installing ri documentation for os-0.9.6
Parsing documentation for signet-0.8.1
Installing ri documentation for signet-0.8.1
Parsing documentation for googleauth-0.6.1
Installing ri documentation for googleauth-0.6.1
Parsing documentation for httpclient-2.8.3
Installing ri documentation for httpclient-2.8.3
Parsing documentation for google-api-client-0.13.6
Installing ri documentation for google-api-client-0.13.6
Parsing documentation for fastlane-2.62.1
Installing ri documentation for fastlane-2.62.1
Done installing documentation for slack-notifier, rouge, xcpretty, terminal-notifier, unicode-display_width, terminal-table, plist, public_suffix, addressable, multipart-post, word_wrap, tty-screen, babosa, colored, highline, commander-fastlane, excon, unf_ext, unf, domain_name, http-cookie, faraday, faraday-cookie_jar, fastimage, mini_magick, multi_json, multi_xml, rubyzip, security, xcpretty-travis-formatter, dotenv, bundler, faraday_middleware, uber, declarative, declarative-option, representable, retriable, mime-types-data, mime-types, little-plugger, logging, jwt, memoist, os, signet, googleauth, httpclient, google-api-client, fastlane after 259 seconds
50 gems installed
4、打开终端,cd到你的工程目录,然后执行
fastlane init
按照提示输入AppleID、password
+----------------+--------------------------------------+
| Detected Values |
+----------------+--------------------------------------+
| Apple ID | vivalab@163.com |
| App Name | Blendcam |
| App Identifier | com.quvideo.Blendcam |
| Workspace | /Users/ios_team08/A_iOS_trunk/iOSBl |
| | endCam/Blendcam/Blendcam.xcworkspac |
| | e |
+----------------+--------------------------------------+
Please confirm the above values (y/n)
y
Created new file './fastlane/Appfile'. Edit it to manage your preferred app metadata information.
[14:17:30]: Loading up 'deliver', this might take a few seconds
[14:17:31]: Login to iTunes Connect (vivalab@163.com)
[14:17:35]: Login successful
+--------------------------------------+------------------------+
| deliver 2.62.1 Summary |
+--------------------------------------+------------------------+
| run_precheck_before_submit | false |
| screenshots_path | ./fastlane/screenshots |
| metadata_path | ./fastlane/metadata |
| username | vivalab@163.com |
| app_identifier | com.quvideo.Blendcam |
| edit_live | false |
| platform | ios |
| skip_binary_upload | false |
| skip_screenshots | false |
| skip_metadata | false |
| skip_app_version_update | false |
| force | false |
| submit_for_review | false |
| automatic_release | false |
| dev_portal_team_id | UX6DFVZ4FJ |
| overwrite_screenshots | false |
| precheck_default_rule_level | warn |
| ignore_language_directory_validatio | false |
| n | |
+--------------------------------------+------------------------+
[14:17:39]: Writing to './fastlane/metadata/en-US/description.txt'
[14:17:39]: Writing to './fastlane/metadata/en-US/keywords.txt'
[14:17:39]: Writing to './fastlane/metadata/en-US/release_notes.txt'
[14:17:39]: Writing to './fastlane/metadata/en-US/support_url.txt'
[14:17:39]: Writing to './fastlane/metadata/en-US/marketing_url.txt'
[14:17:39]: Writing to './fastlane/metadata/en-US/promotional_text.txt'
[14:17:39]: Writing to './fastlane/metadata/en-US/name.txt'
[14:17:39]: Writing to './fastlane/metadata/en-US/subtitle.txt'
[14:17:39]: Writing to './fastlane/metadata/en-US/privacy_url.txt'
[14:17:39]: Writing to './fastlane/metadata/copyright.txt'
[14:17:39]: Writing to './fastlane/metadata/primary_category.txt'
[14:17:39]: Writing to './fastlane/metadata/secondary_category.txt'
[14:17:39]: Writing to './fastlane/metadata/primary_first_sub_category.txt'
[14:17:39]: Writing to './fastlane/metadata/primary_second_sub_category.txt'
[14:17:39]: Writing to './fastlane/metadata/secondary_first_sub_category.txt'
[14:17:39]: Writing to './fastlane/metadata/secondary_second_sub_category.txt'
[14:17:39]: Writing to './fastlane/metadata/trade_representative_contact_information/trade_name.txt'
[14:17:39]: Writing to './fastlane/metadata/trade_representative_contact_information/address_line1.txt'
[14:17:39]: Writing to './fastlane/metadata/trade_representative_contact_information/city_name.txt'
[14:17:39]: Writing to './fastlane/metadata/trade_representative_contact_information/state.txt'
[14:17:39]: Writing to './fastlane/metadata/trade_representative_contact_information/country.txt'
[14:17:39]: Writing to './fastlane/metadata/trade_representative_contact_information/is_displayed_on_app_store.txt'
[14:17:39]: Writing to './fastlane/metadata/review_information/first_name.txt'
[14:17:39]: Writing to './fastlane/metadata/review_information/last_name.txt'
[14:17:39]: Writing to './fastlane/metadata/review_information/phone_number.txt'
[14:17:39]: Writing to './fastlane/metadata/review_information/email_address.txt'
[14:17:39]: Writing to './fastlane/metadata/review_information/demo_user.txt'
[14:17:39]: Writing to './fastlane/metadata/review_information/demo_password.txt'
[14:17:39]: Writing to './fastlane/metadata/review_information/notes.txt'
[14:17:39]: Successfully created new configuration files.
[14:17:39]: Downloading all existing screenshots...
[14:17:41]: Successfully downloaded all existing screenshots
[14:17:41]: Successfully created new Deliverfile at path './fastlane/Deliverfile'
[14:17:41]: 'snapshot' not enabled.
[14:17:41]: 'cocoapods' enabled.
[14:17:41]: 'carthage' not enabled.
[14:17:41]: Created new file './fastlane/Fastfile'. Edit it to manage your own deployment lanes.
[14:17:41]: fastlane will collect the number of errors for each action to detect integration issues
[14:17:41]: No sensitive/private information will be uploaded
[14:17:41]: Learn more at https://github.com/fastlane/fastlane#metrics
[14:17:41]: Successfully finished setting up fastlane
管理fastlane :Use a Gemfile
推荐是有Gemfile管理fastlane(以下操作是在工程根目录下进行):
1、安装bundler
(管理gem依赖的工具)
sudo gem install bundler
2、创建Gemfile
vim Gemfile
然后再Gemfile中编辑:
source "https://rubygems.org"
gem "fastlane"
3、add Gemfile.lock控制版本
sudo bundle update
4、执行fastlane:
bundle exec fastlane [lane]
附:bundle的install和update
1、第一次安装:
sudo bundle install
2、update
sudo bundle update