Mac 官方安装fastlane教程

作者: tanghaiyang | 来源:发表于2017-08-09 16:58 被阅读121次
fastlane官方教程

fastlane.

fastlane docs.

fastlane Getting Started guide for iOS

fastlane Getting Started guide for Android

blogs

自己感觉如果是单个项目来说使用fastlane来打包要比jenkins要简便一些,最起码配置要简单的多了。

Installation

Make sure you have the latest version of the Xcode command line tools installed:

xcode-select --install

Choose your installation method:

Snip20170809_11.png

这里我使用的是第一种通过Homebrew安装的

$ sudo gem install fastlane --verbose(推荐使用这个方法安装fastlane)

brew cask install fastlane(这种方法安装会出现找不到fastlane的问题)

安装过程需要耐心等待

Snip20170809_9.png

然后需要执行

export PATH="$HOME/.fastlane/bin:$PATH"

Snip20170809_10.png

这样就安装完成了,你可以输入

fastlane env

Please update using fastlane update_fastlane

$ fastlane update_fastlane

Setting up fastlane

Navigate your terminal to your project's directory and run for Ruby setup:

$ fastlane init

Building your app

这里我简单的打一个ipa
1、编辑Appfile文件

app_identifier "com.JingJiRiBao.com" # The bundle identifier of your app
apple_id "299_xh_dbs_apple@xinhuamm.net" # Your Apple email address

team_id "R2U8SE68WE" # Developer Portal Team ID

# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md

2、编辑Fastfile文件

lane :beta do
  gym(scheme: "JingJiRiBao", # Build your app - more options available
    clean:true, # 在构建前先clean
    configuration:"Release",  # 配置为Release版本
    export_method:"enterprise", # export_method默认是"appstore"
  )
  end

3、执行命令

$ fastlane beta

Snip20171213_8.png

4、错误处理


Snip20171214_10.png

5、学习


CE8592741E8A78E605E1535F39C3F563.png

相关文章

网友评论

    本文标题:Mac 官方安装fastlane教程

    本文链接:https://www.haomeiwen.com/subject/brjqrxtx.html