7.2 C
London
Thursday, April 18, 2024

ios – Fastlane, Github actions. Scheme shouldn’t be at present configured for the construct motion


After I add React Native app to testflight with Github actions and Fastlane I get construct error

xcodebuild: error: Scheme qa shouldn't be at present configured for the construct motion.
Exit standing: 66

All my schemes are shared in Xcode. After I began command domestically, all works nice, add succeeded.

My .yml file:

title: Launch

on:
  push:
    branches:
      - qa

jobs:
  release-ios:
    title: Construct and launch iOS app
    runs-on: macos-latest
    steps:
      - makes use of: actions/checkout@v2
      - makes use of: actions/setup-node@v1
        with:
          node-version: "18.x"
      - makes use of: ruby/setup-ruby@v1
        with:
          ruby-version: '3.2.0'
      - title: Take away Derived Knowledge
        run: rm -rf ~/Library/Developer/Xcode/DerivedData
      - title: Yarn Set up
        run: yarn
      - title: Set up Fastlane
        run: cd ios && bundle set up && cd ..
      - title: Set up pods
        run: cd ios && pod set up && cd ..
      - title: Execute Fastlane command
        run: cd ios && fastlane qa

my FastFile:

default_platform(:ios)

DEVELOPER_APP_ID = ENV["DEVELOPER_APP_ID"]
DEVELOPER_APP_QA_IDENTIFIER = ENV["DEVELOPER_APP_QA_IDENTIFIER"]
DEVELOPER_APP_STAGE_IDENTIFIER = ENV["DEVELOPER_APP_STAGE_IDENTIFIER"]
PROVISIONING_PROFILE_SPECIFIER = ENV["PROVISIONING_PROFILE_SPECIFIER"]
TEMP_KEYCHAIN_USER = ENV["TEMP_KEYCHAIN_USER"]
TEMP_KEYCHAIN_PASSWORD = ENV["TEMP_KEYCHAIN_PASSWORD"]
APPLE_ISSUER_ID = ENV["APPLE_ISSUER_ID"]
APPLE_KEY_ID = ENV["APPLE_KEY_ID"]
APPLE_KEY_CONTENT = ENV["APPLE_KEY_CONTENT"]
GIT_AUTHORIZATION = ENV["GIT_AUTHORIZATION"]

def delete_temp_keychain(title)
  delete_keychain(
    title: title
  ) if File.exist? File.expand_path("~/Library/Keychains/#{title}-db")
finish

def create_temp_keychain(title, password)
  create_keychain(
    title: title,
    password: password,
     default_keychain: true,
     unlock: true,
  )
finish

def ensure_temp_keychain(title, password)
  delete_temp_keychain(title)
  create_temp_keychain(title, password)
finish

desc 'GitHub actions launch'
lane :model do |choices|
  updateVersion(choices)
  increment_build_number(xcodeproj: 'My.xcodeproj')
finish

# QA
lane :qa do |_options|
  app_identifier = DEVELOPER_APP_QA_IDENTIFIER
  keychain_name = TEMP_KEYCHAIN_USER
  keychain_password = TEMP_KEYCHAIN_PASSWORD
  ensure_temp_keychain(keychain_name, keychain_password)
  create_keychain(
      title: TEMP_KEYCHAIN_USER,
      password: TEMP_KEYCHAIN_PASSWORD,
      timeout: 1800,
      default_keychain: true,
      unlock: true,
      lock_when_sleeps: false
    )
  import_certificate(
    certificate_path: 'MyCertificate.cer',
    keychain_name: keychain_name,
    keychain_password: keychain_password
  )
  install_provisioning_profile(path: './profile.mobileprovision')
  update_project_provisioning(
    xcodeproj: 'My.xcodeproj',
    target_filter: 'github',
    profile: './profile.mobileprovision',
    build_configuration: 'Debug'
  )
  api_key = app_store_connect_api_key(
           key_id: APPLE_KEY_ID,
           issuer_id: APPLE_ISSUER_ID,
           key_filepath: "AuthKey.p8",
           in_house: false # non-compulsory however could also be required if utilizing match/sigh
    )
    recreate_schemes(venture: "My.xcodeproj")
  build_app(
    venture: "My.xcodeproj",
    scheme: 'qa',
    clear: true,
    export_method: "app-store",
    export_options: {
        provisioningProfiles: {
            "myBundleId" => "myProfile"
        },
    }
)

  upload_to_app_store(
    pressure: true,
    reject_if_possible: true,
    skip_metadata: true,
    skip_screenshots: true,
    languages: ['en-US'],
    release_notes: {
      'default' => "Shiny and new",
    },
    submit_for_review: true,
    precheck_include_in_app_purchases: false,
    automatic_release: true,
    submission_information: {
      add_id_info_uses_idfa: true,
      add_id_info_serves_ads: true,
      add_id_info_tracks_install: true,
      add_id_info_tracks_action: false,
      add_id_info_limits_tracking: true,
      export_compliance_encryption_updated: false
    },
    api_key: api_key
  )
finish

Any recommendations?

I anticipated successfull construct and importing to testflight, however bought error.

Latest news
Related news

LEAVE A REPLY

Please enter your comment!
Please enter your name here