美文网首页
Fastlane - gym

Fastlane - gym

作者: little_ma | 来源:发表于2017-11-20 16:35 被阅读542次

认识Xcodebuild命令

gym概述:

Gym Features
🚀 gym 编译速度高于其他命令30%
🏁 更好的输出
📖 帮助解决内部错误,如:签名问题
🚠 灵活的默认值: 自动检测project、scheme
🔗 很好配合其他插件
📦 自动生成.ipa和DYSM文件
🚅 简单, just gym
🔧 简单和动态配置使用参数和环境变量
💾 存储共同配置在“Gymfile”
📤 所有的archives被存储,并且Xcode Organizer可访问
💻 支持所有iOS 、 Mac applications

使用方法:

fastlane gym

fastlane gym --workspace "Example.xcworkspace" --scheme "AppName" --clean

注:如果需要制定Xcode编译,添加:DEVELOPER_DIR="/Applications/Xcode6.2.app" fastlane gym

gym使用详情查看:
fastlane action gym

App Store 或者 TestFlight:

fastlane gym --export_method ad-hoc

添加相关参数:

fastlane gym --include_bitcode true --include_symbols false

可在Gymfile文件配置相关参数:

export_options(
  method: "ad-hoc",
  manifest: {
    appURL: "https://example.com/My App.ipa",
  },
  thinning: "<thin-for-all-variants>"
)

选择手动匹配证书:

export_options(
  method: "app-store",
  provisioningProfiles: { 
    "com.example.bundleid" => "Provisioning Profile Name",
    "com.example.bundleid2" => "Provisioning Profile Name 2"
  }
)

Note: 如果选择了match就不需要配置相关的证书和描述文件,自从Xcode8之后基本使用自动匹配证书,所以不再详细讲手动匹配。

栗子:

desc "Submit a new adhoc Beta Build to https://www.pgyer.com/"
  lane :adhoc do

    #清除上一次的ipa文件
    clean_ipafile

    match(git_url: certificates_git_url,
      type: "adhoc",
      app_identifier: app_bundle_identifiers,
      readonly: true,
    )

    gym(scheme: app_scheme,
        workspace: app_workspace,
        include_bitcode: true,
        configuration: "Release",
        export_method: "ad-hoc",
        output_directory: ipa_out_path,
        output_name: ipa_out_name,
        silent: false,
        include_symbols: true,
    )

    pgyer(api_key: pgyer_api_key, user_key: pgyer_uKey)

  end

源码分析

相关文章

网友评论

      本文标题:Fastlane - gym

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