Skip to content

Instantly share code, notes, and snippets.

@koingdev
Created December 29, 2021 07:14
Show Gist options
  • Select an option

  • Save koingdev/40fca4418888886d9adbdf41585290e4 to your computer and use it in GitHub Desktop.

Select an option

Save koingdev/40fca4418888886d9adbdf41585290e4 to your computer and use it in GitHub Desktop.

Revisions

  1. koingdev created this gist Dec 29, 2021.
    40 changes: 40 additions & 0 deletions Fastfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    lane :upload_testflight_on_pushing_tag do |options|
    # Tag: Release-1.0.0-100 (Release-Version-Build)
    tag_components = sh("git tag --sort=taggerdate | tail -1").split("-")
    version = tag_components[1]
    build = tag_components[2]

    # Increment version and build number
    increment_version_and_build_number(version: version, build: build)

    # Generate iPA
    build_ios_app(
    clean: true,
    scheme: "Release",
    configuration: "Release",
    derived_data_path: "Build",
    output_directory: "./artifacts/device",
    workspace: "App.xcworkspace",
    export_method: "app-store",
    export_options: {
    uploadBitcode: false,
    compileBitcode: false,
    include_symbols: true,
    teamID: "TEAM_ID",
    provisioningProfiles: {
    "BUNDLE_ID" => "PROFILE_UUID"
    }
    }
    )

    # Upload iPA: required both params apple_id & skip_waiting_for_build_processing to bypass Apple 2FA
    upload_to_testflight(
    ipa: "./artifacts/device/App.ipa",
    apple_id: "APPLE_ID_IN_GENERAL_INFORMATION_SECTION_ON_APPSTORECONNECT",
    skip_submission: true,
    skip_waiting_for_build_processing: true
    )

    # Upload dSYM
    upload_symbols_to_crashlytics(dsym_path: "./artifacts/device/App.app.dSYM.zip")
    end