Fastlane doesn't work for Apple id with two factor authentication on continuous integration working with Gitlab
On yout machine when CI is running, go to the terminal and type the following command:
fastlane spaceauth -u my.account@gmail.com
Then fastlane will ask you about the code:
Please enter 6 digits code:
. Get it from another trusted device and type it here.- You will receive FASTLANE_SESSION key. Just copy and paste it.
- Login to your gitlab account that is used along with your CI and go to
Settings > CI/CD > Variables
. Then defineFASTLANE_SESSION
variable, type the value and save. - Run your job again.
Automating 2FA using Fastlane/CircleCI
You can authenticate with Apple through API key. You can generate the key here: https://appstoreconnect.apple.com/access/api.
Once you have the key.p8 file, you can used to auth with the fastlane command: app_store_connect_api_key
as follow:
app_store_connect_api_key(
key_id: "ABCDEFG",
issuer_id: "Your_issuer_id",
key_content: File.read("./key.p8").chomp,
duration: 1200,
in_house: false
)
After the execution of the command, the key session is store in the following env var: APP_STORE_CONNECT_API_KEY
so your upload to testflight should look like this:
upload_to_testflight(
groups: ["Friends & Family","Mytest-Group"],
ipa: "./build/myapp.ipa",
api_key: Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
)
fastlane boarding process for fabric beta webpage setup
Mike from Fabric & Firebase here. I think you're looking for "Share Links" from Beta. After your first build, you can click on Share Links under the Beta tab.
From there, you click on "+ Create New"
and then setup the link with the necessary information. You can also optionally an email domain restriction if you only want testers from your company's domain.
After that, you'll have a static page where folks can sign up to test.
Can I turn off two-factor authentication for an account that is used only in build machine?
You can't turn off two-factor authentication, but you should be able to use an app-specific password.
- Go to https://appleid.apple.com and log in
- In the Security section, click on "Generate password..."
- Give your password a name
- Copy the password that is shown; Once you close the dialog box you cannot see it again.
- Configure that password on your build machine.
Related Topics
How to Solve Mach-O-Linker Error in iOS7 & Xcode 5.0.1
Dateformatter Gives Wrong Time on Conversation
Calculate The Range of Visible Text in UIlabel
Whats the Correct Way, Using "Init" or "Didmove"
How to Loop Through and Get All The Keys of The Nested Nodes in Firebase
Uitableview Is Jumping When I Insert New Rows
Sprite Frame Animation Cocos2D 3.0
Converting Nsdictionary to Xml
Programmatically Change Splash Screen in iOS
How to Make Collage of Images According to Different Shapes
Exceeding Max Text("") Concatenation Length - Swiftui -
Xcode Export App, Wildcard Error
How to Draw a Uilabel with a Different Blend Mode in Draw(_ Rect: Cgrect) in Swift
How to Get Original Nsdata of UIimage
Is There a Way of Automatically Writing Custom Values to The Bundle's .Plist During a Build Phase
Firebase Database Not Equal Request - Alternative Solution (For iOS)
How to Use @Objc Protocol with Optional and Extensions at the Same Time