
Usually you'd only know about it when your build starts failing. This means you'll have to generate a new session at least once a month. The session's validity can greatly vary (anything between 1 day and 1 month, depending on factors such as geolocation of the session usage).It's advised that you create the session in the same machine that will be used to consume it, to make the session last longer. your local machine), you might run into issues. CI system) is different than the region where you created that session (e.g. An Apple ID session is only valid within a certain region, meaning if the region you're using your session (e.g.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 match ci 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.
Fastlane match ci code#
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.


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) 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. Several fastlane actions communicate with Apple services that need authentication.
