Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one -22938

11,499

Solution 1

Solution

As the error message says, we need to create an app-specific password at the:

http://appleid.apple.com

address. Go to the security section and use the Generate Password.

Generate Password

Use the Generate Password link to create a new password. Copy and paste the password and don't forget you won't be able to find the password again after you click on the Done button.

FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD

Then, set the FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD environment variables at your bash or your .bash_profile file. This file could be different depending on your choice for the bash on your terminal. For example, if your bash of choice is ZSH like mine, you need to edit the .zshrc file.

Then re-run your Fastlane with:

bundle exec fastlane beta --verbose

Note: When you can not enter the security code manually, as on a Continuous Integration system, you have to use other ways to log in. The application-specific password will not work if your action usage does anything else than uploading the binary, e.g. updating any metadata like setting release notes or distributing to testers, etc.

Generating a login session for Apple ID

As your CI machine will not be able to prompt you for your two-factor authentication or two-step verification information, you need to generate a login session for Apple ID in advance. You can get on your local machine this by running:

fastlane spaceauth -u [email protected]

for more, please check the fastlane documentation .

Hope this helps!

Solution 2

Here is a screnshot of the error enter image description here

and here is where to create the app-specific password enter image description here

Solution 3

I met the issue, but set the FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD environment variables at .zshrc (I'm using ZSH) didn't work.

Instead, I set that var in Fastfile:

before_all do
  ...
  ENV['FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD']= 'xxxx-xxxx-xxxx-xxxx'
  ...
end

Solution 4

I had issues trying to use pilot/upload_to_testflight along side FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD. It was always giving me error on the 2FA step. Turns out that in order for pilot to use that env variable 2 arguments must to be passed on, apple_id and skip_waiting_for_build_processing, otherwise normal username and password auth will be used.

pilot(apple_id: ENV["YOUR_ID"],
        skip_submission: true,
        skip_waiting_for_build_processing: true)

Note that this only works only for upload, for any other interactions the recommended approach is to use api_key.

Share:
11,499
mgyky
Author by

mgyky

Mostly working on Objective-C, Swift, AVFoundation, Frameworks, tvOS, SPM... etc. AVFoundation & Fairplay Master Ask anything about AVFoundation and Fairplay streaming. tvOS Master Ask anything about Apple Tv and tvOS focus engine. Frameworks Ask anything about creating a framework on iOS/tvOS/macOS. Supporting Swift and/or Objective-C. Swift Package Manager Ask anything about SPM and multiple language support. Developer Full-time iOS/tvOS/macOS for the last 10 years, also love to work with Shell Script. Early days of my career (First 8 Years), I was a C developer and after that a Web Developer (E-Commerce, CMS, etc.) Ready to help #SOreadytohelp! Plus Husband, father of a son, nature and bike lover :)

Updated on July 17, 2022

Comments

  • mgyky
    mgyky almost 2 years

    While I'm trying to send my application via Fastlane I face with this error:

    Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com (-22938)

    Transporter transfer failed.Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com (-22938)Your account has 2 step verification enabled. Please go to https://appleid.apple.com/account/manage and generate an application specific password for the iTunes Transporter, which is used to upload builds. To set the application specific password on a CI machine using an environment variable, you can set the FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD variable.

    Please provide your Apple Developer Program account credentials The login information you enter will be stored in your macOS Keychain Password (application-specific for [email protected])

  • Larme
    Larme about 5 years
    Does that password has to be visible in clear in it the bash profile? Isn't it a security issue?
  • mgyky
    mgyky about 5 years
    Of course, you can set at the environment variables too... I believe it's a secure server machine that specifically used for your CI process. Best.
  • eja08
    eja08 over 3 years
    what should the password label be?
  • Jonathan Sanchez
    Jonathan Sanchez over 3 years
    It could be whatever you want it to be, is just a LABEL to the password
  • humblePilgrim
    humblePilgrim over 3 years
    Is there a way to prevent this from being asked everytime ?
  • Gerry
    Gerry about 3 years
    I have an "app-specific password"... I need to sign in... where now?
  • mgyky
    mgyky about 3 years
    Sorry, I didn't understand your question, please read carefully. Best