Fastlane安装指南

Fastlane概况说明:
🚀 节省发布Release版本、Beta版本以及提交审核信息的时间成本
✨ 提供170多个功能和服务
📖 全部开源
🎩 安装便捷、使用方便
🖥 支持 iOS, Mac, Android
🔧 自由的扩展和定制Fastlane
💭 只需简单的操作fastlane命令,无需其他命令

Fastlane主要功能:


intro-fastlane-tree.png
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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,911评论 5 460
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 82,014评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 142,129评论 0 320
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,283评论 1 264
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,159评论 4 357
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,161评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,565评论 3 382
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,251评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,531评论 1 292
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,619评论 2 310
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,383评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,255评论 3 313
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,624评论 3 299
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,916评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,199评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,553评论 2 342
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,756评论 2 335

推荐阅读更多精彩内容