Fastlane是什么

  • Git地址: Fastlane

  • 文档地址:Fastlane Document

    • Fastlane是一整套的客户端CICD工具集合。Fastlane可以非常快速简单的搭建一个自动化发布服务,并且支持Android,iOS,MacOS。
    • Fastlane命令执行的底层并不是自己实现的,而是调用其他的插件或者工具执行的。比如说打包,Fastlane中的gym工具只是xcodebuild工具的一个封装,调用的其实还是xcodebuild中的打包命令。
    • Fastlane本身没有一套特殊语法,使用的Ruby语言。
    • Fastlane的插件工具叫做action,每一个action都对应一个具体的功能

Fastlane安装

1、安装xcode命令行工具,在终端输入:

xcode-select --install

2、安装Fastlane,在终端输入:

//方式一:Using RubyGems
sudo gem install fastlane -NV
//方式二:Using Homebrew
brew cask install fastlane

Fastlane初始化工程

1、进入工程的根目录,在终端输入Fastlane初始化命令:

sudo fastlane init

2、初始化完成后会要求选择创建目的:

  • What would you like to use fastlane for?

      1. Automate screenshots
      1. Automate beta distribution to TestFlight
      1. Automate App Store distribution
      1. Manual setup - manually setup your project to automate your tasks

如果是要上传AppleStore选3,如果是企业版选4

3、安装验证

  • 在fastlane文件中写入:
default_platform(:ios)
platform :ios do
desc "生成本地版本"
lane :testabc do
build_app(scheme: "ZEUS")
end
end
  • 进入工程的根目录,在终端输入:
fastlane testabc desc:测试打包

Fastlane常用工具(action)

查询action:

在命令行输入:

//查询所有action
fastlane actions
//查询制定action
fastlane action [action_name]

action分类:

  • Testing
Action Description Supported Platforms
scan Alias for the run_tests action ios, mac
slather Use slather to generate a code coverage report ios, mac
swiftlint Run swift code validation using SwiftLint ios, mac
xcov Nice code coverage reports without hassle ios, mac
sonar Invokes sonar-scanner to programmatically run SonarQube analysis ios, android, mac
oclint Lints implementation files with OCLint ios, android, mac
gcovr Runs test coverage reports for your Xcode project ios
lcov Generates coverage data using lcov ios, mac
appium Run UI test by Appium with RSpec ios, android
xctool Run tests using xctool ios, mac
run_tests Easily run tests of your iOS app (via scan) ios, mac
xcode_server_get_assets Downloads Xcode Bot assets like the .xcarchive and logs ios, mac
  • Building
  • Screenshots
  • Project
  • Code Signing
  • Documentation
  • Beta
  • Push
  • Releasing your app
  • Source Control
  • Notifications
  • App Store Connect
  • Misc
  • Deprecated

踩坑笔记

  • 1.报Missing Private Key:

    需要从有证书的Mac中导入证书的p12私钥安装到新的打包机

  • 2.在compiling Swift source files这一步再也不动了:

    Project --> Build Settings --> Swift compiler-code generation 找到Optimization Level 将其设置为No optimization[-Onone]

Fastlane基础介绍的更多相关文章

  1. Web3D编程入门总结——WebGL与Three.js基础介绍

    /*在这里对这段时间学习的3D编程知识做个总结,以备再次出发.计划分成“webgl与three.js基础介绍”.“面向对象的基础3D场景框架编写”.“模型导入与简单3D游戏编写”三个部分,其他零散知识 ...

  2. C++ 迭代器 基础介绍

    C++ 迭代器 基础介绍 迭代器提供对一个容器中的对象的访问方法,并且定义了容器中对象的范围.迭代器就如同一个指针.事实上,C++的指针也是一种迭代器.但是,迭代器不仅仅是指针,因此你不能认为他们一定 ...

  3. Node.js学习笔记(一)基础介绍

    什么是Node.js 官网介绍: Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js us ...

  4. Node.js 基础介绍

    什么是Node.js 官网介绍: Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js us ...

  5. 1、git基础介绍及远程/本地仓库、分支

    1. Git基础介绍 基于Git进行开发时,首先需要将远程仓库代码clone到本地,即为本地仓库.后续大部分时间都是基于本地仓库上的分支进行编码,最后将本地仓库的代码合入远程仓库. 1.1. 远程仓库 ...

  6. git基础介绍

    git基础介绍 这是git操作的基础篇,是以前的写的操作文档,就没有进行手打,直接把图片贴进来了,你们担待哈,有不正确的地方可以指正出来,我将在第一时间去修改,多谢哈! 一.文件状态:git系统的文件 ...

  7. OSPF基础介绍

    OSPF基础介绍 一.RIP的缺陷 1.以跳数评估的路由并非最优路径 2.最大跳数16导致网络尺度小 3.收敛速度慢 4.更新发送全部路由表浪费网络资源 二.OSPF基本原理 1.什么是OSPF a& ...

  8. iOS系统及客户端软件测试的基础介绍

    iOS系统及客户端软件测试的基础介绍 iOS现在的最新版本iOS5是10月12号推出,当前版本是4.3.5 先是硬件部分,采用iOS系统的是iPad,iPhone,iTouch这三种设备,其中iPho ...

  9. 高通camera结构(摄像头基础介绍)

    摄像头基础介绍 一.摄像头结构和工作原理. 拍摄景物通过镜头,将生成的光学图像投射到传感器上,然后光学图像被转换成电信号,电信号再经过模数转换变为数字信号,数字信号经过DSP加工处理,再被送到电脑中进 ...

随机推荐

  1. css控制单行或者多行文本超出显示省略号

    1.单行文本 使用text-overflow:ellipsis属性 text-overflow: clip|ellipsis|string; clip:修剪文本. ellipsis:显示省略符号来代表 ...

  2. 2019-03-22 Python Scrapy 入门教程 笔记

    Python Scrapy 入门教程 入门教程笔记: # 创建mySpider scrapy startproject mySpider # 创建itcast.py cd C:\Users\theDa ...

  3. webpack基础知识点

    webpack 是一个现代的 JavaScript 应用程序的模块打包器(module bundler). 入口(Entry) webpack 将创建所有应用程序的依赖关系图表(dependency ...

  4. 2、Koa2 路由+cookie

    一.koa2 原生路由的实现 const Koa = require('koa'); const app = new Koa(); const fs = require('fs'); function ...

  5. WCF与WEB API区别

  6. Spring中 @Autowired标签与 @Resource标签 的区别(转)

    spring不但支持自己定义的@Autowired注解,还支持由JSR-250规范定义的几个注解,如:@Resource. @PostConstruct及@PreDestroy. 1. @Autowi ...

  7. HDU 4335 Contest 4

    利用降幂公式..呃,还是自己去搜题解吧.知道降幂公式后,就不难了. #include <iostream> #include <cstdio> #include <alg ...

  8. HDU 4390 Number Sequence (容斥原理+组合计数)

    HDU 4390 题意: 大概就是这样.不翻译了: Given a number sequence b1,b2-bn. Please count how many number sequences a ...

  9. [Puppeteer] Get a Page's Load Time with Puppeteer (window.profermence.timing)

    In this lesson we are going to use Google's Puppeteer to gather metrics about a page's load time. We ...

  10. oracle刚開始学习的人经常使用操作100问

    oracle刚開始学习的人经常使用操作100问 1. Oracle安装完毕后的初始口令?   internal/oracle sys/change_on_install system/manager ...