fastlane-iOS自动化打包工具

1、安装fastlane

1、确保安装Xcode Command Line Tools ,没有安装在终端输入:

xcode-select --install

2、安装Tools完成之后在终端输入:

sudo gem install fastlane --verbose

假如报错用:sudo gem install -n /usr/local/bin fastlane

2、初始化

1、终端 cd到工程目录下,初始化:

fastlane init   =============  fastlane下载到工程目录下

2、输入AppID和密码,确认APP信息

3、配置Fastfile文件,在Fastfile文件中添加

  desc “development"
  lane :development do
    # match(type: "adhoc")
    # snapshot
    gym(
    scheme: "项目名称",
    export_method: "development",
        configuration: “Debug”,
        output_directory: "~/Desktop/"
    )
    # Build your app - more options available
    notification(
        title: "打包成功"
    )
    deliver(force: true)
    # frameit
  end


  desc “adHoc"
  lane :adHoc do
    # match(type: "adhoc")
    # snapshot
    gym(
    scheme: "项目名称",
    export_method: "ad-hoc",
        configuration: "Debug",
        output_directory: "~/Desktop/"
    )
    # Build your app - more options available
    notification(
        title: "打包成功"
    )
    deliver(force: true)
    # frameit
  end


  desc "release"
  lane :release do
    # match(type: "appstore")
    # snapshot
    gym(
    scheme: "项目名称",
        export_method: "app-store",
        configuration: "Release",
        output_directory: "~/Desktop/"
      ) # Build your app - more options available

    notification(
        title: "打包成功"
      )
    # deliver(force: true)
    # frameit
  end

你可能感兴趣的:(fastlane-iOS自动化打包工具)