The session generated, stored and reused as part of a 2FA/2SV authentication, or as part of spaceauth is subject to technical limitations imposed by Apple. It's advised that you run spaceauth in the same machine as your CI, instead of running it locally on your machine - see the notes below regarding session duration. This session will be reused instead of triggering a new login each time fastlane communicates with Apple's APIs.
#Fastlane 2 verification#
Storing a manually verified session using spaceauthĪs your CI machine will not be able to prompt you for your two-factor authentication or two-step verification information, you can generate a login session for your Apple ID in advance by running: fastlane spaceauth -u generated value then has to be stored inside the FASTLANE_SESSION environment variable on your CI system. The resulting session will be stored in ~/.fastlane/spaceship//cookie. If you don't have any devices configured, but have trusted a phone number, then the code will be sent to your phone. If you already have a trusted device configured for your account, then the code will appear on the device. With 2-factor authentication (or 2-step verification) enabled, you will be asked to verify your identity by entering a security code. Luckily, fastlane fully supports 2-factor authentication (2FA) (and legacy 2-step verification (2SV)) for logging in to your Apple ID and Apple Developer account. Method 2: Two-step or two-factor authenticationįor actions that aren't yet supported by the official App Store Connect API, you will need to authenticate with your Apple ID.
![fastlane 2 fastlane 2](https://cdn.shopify.com/s/files/1/0051/1138/2129/products/bd57a07261110a4b80f810ea7e1177a9_1024x1024.jpg)
Check out App Store Connect API for more information. However, it doesn't support all of the fastlane features yet. This is the recommended and official way of authenticating with Apple services. There are 4 ways to connect to Apple services: Method 1: App Store Connect API key (recommended)
![fastlane 2 fastlane 2](https://i.ebayimg.com/images/g/MsAAAOSwi-9Zi2~n/s-l300.jpg)
As this can pose several challenges especially on CI, this document focuses on those challenges, but everything described here can be done on your local machine as well.
![fastlane 2 fastlane 2](https://i.ytimg.com/vi/moXybhjoSjg/maxresdefault.jpg)
Several fastlane actions communicate with Apple services that need authentication.