Unable to get FASTLANE to use API based credentialing to get token for testflight upload into Apple Business Connect

Yes, I am using the free tier. But I think even the free version should be working. API based testflight upload does not work. It seems as though FASTLANE has not been updated to meet Apple Standards of not using the username/app password approach to connect to testflight. Has anyone seen a workaround for this?

hey, a bit confused about your message… you said “Yes, I am using the free tier” , what are you referring to?

This code works for me to Build and sign the application for distribution and upload it to TestFlight using fastlane. I’m using gitlab Apple Apps Store integration. Hope it helps.

# e.g. fastlane ios deploy beta:true
  desc "Build and sign the application for distribution, upload to TestFlight"
  lane :deploy do |options|
    setup_ci

    match(type: 'appstore', readonly: is_ci)

    # Login to App Store Connect in order to perform actions later
    # in this process. Configuration provided by environment variables added
    # by the GitLab Apple Apps Store integration
    # https://docs.gitlab.com/ee/user/project/integrations/apple_app_store.html
    # https://docs.fastlane.tools/actions/app_store_connect_api_key/
    app_store_connect_api_key

    if options[:beta]
      # Upload the newly created build to Test Flight using the App Store Connect
      # API key above, and the app configuration in the Appfile
      # https://docs.fastlane.tools/actions/upload_to_testflight/
      upload_to_testflight(
        ipa: 'ios/App/build/App.ipa',
        notify_external_testers: false
      )
    else
      upload_to_app_store(
        ipa: 'ios/App/build/App.ipa',
        skip_screenshots: true,
        skip_metadata: true,
        precheck_include_in_app_purchases: false,
        automatic_release: false
      )
    end
  end

If you want an easier way to solve this without even touching a line of code, feel free to check out Capawesome Native Builds.

The older Fastlane versions might have this bug. Force update.
sudo gem uninstall fastlane
sudo gem install fastlane
fastlane --version

If you need native build simpler than doing all the config yourself you can try for free capgo builder Capgo | Capgo Builder