Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Fastlane基础介绍大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

Fastlane是什么

  • Git地址: Fastlane
  • 文档地址:Fastlane Document

    • Fastlane是一整套的客户端CICD工具集合。Fastlane可以非常快速简单的搭建一个自动化发布服务,并且支持Android,iOS,MacOS。
    • Fastlane命令执行的底层并不是自己实现的,而是@L_607_6@其他的插件或者工具执行的。比如说打包,Fastlane中的gym工具只是xcodebuild工具的一个封装,@L_607_6@的其实还是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
      2. @H_404_55@
      1. Automate beta diStribution to TestFlight
      2. @H_404_55@
      1. Automate App Store diStribution
      2. @H_404_55@
      1. @H_701_7@manual setup - manually setup your project to automate your tasks @H_404_55@

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

3、安装验证

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

Fastlane常用工具(action)

查询action:

在命令行输入:

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

action分类

@H_944_125@ @H_675_127@scan @H_675_127@Alias for the run_tests action @H_675_127@ios,mac @H_675_127@slather @H_675_127@Use slather to generate a code coverage report @H_675_127@ios,mac @H_675_127@swiftlint @H_675_127@Run swift code validation using SwiftLint @H_675_127@ios,mac @H_675_127@xcov @H_675_127@Nice code coverage reports without hassle @H_675_127@ios,mac @H_675_127@sonar @H_675_127@Invokes sonar-scAnner to progrAMMatically run SonarQube analysis @H_675_127@ios,android,mac @H_675_127@oclint @H_675_127@Lints implementation files with OCLint @H_675_127@ios,mac @H_675_127@gcovr @H_675_127@Runs test coverage reports for your Xcode project @H_675_127@ios @H_675_127@lcov @H_675_127@Generates coverage data using lcov @H_675_127@ios,mac @H_675_127@appium @H_675_127@Run UI test by Appium with RSpec @H_675_127@ios,android @H_675_127@xctool @H_675_127@Run tests using xctool @H_675_127@ios,mac @H_675_127@run_tests @H_675_127@Easily run tests of your iOS app (via scan) @H_675_127@ios,mac @H_675_127@xcode_server_get_assets @H_675_127@Downloads Xcode Bot assets like the .xcarchive and logs @H_675_127@ios,mac
Action Description Supported Platforms
  • Building
  • Screenshots
  • Project
  • Code Signing
  • Documentation
  • Beta
  • Push
  • Releasing your app
  • source Control
  • Notifications
  • App Store Connect
  • @H_701_7@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基础介绍全部内容,希望文章能够帮你解决Fastlane基础介绍所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。