Fallbacks commands
Download the fallback file your app bundles for when it can’t reach Adapty. This is the same file as the Fallbacks download on the Placements page.
adapty fallbacks get
adapty fallbacks get --app <app-id> --platform ios --sdk-version 4.4.0 --output ios_fallback.json
| Flag | Required | Description |
|---|---|---|
--app | Yes | App ID (UUID) |
--platform | Yes | ios for the App Store or android for Google Play. macOS and visionOS apps use the ios file. |
--sdk-version | Yes | The Adapty SDK version your app is built with, as X.Y.Z. For Flutter, React Native, Unity, Kotlin Multiplatform, and Capacitor, pass the Adapty plugin version. |
--output | No | File to write. Parent directories are created. Without it, the file goes to standard output. |
One file per store covers every placement of the app. To ship both stores, run the command once with --platform ios and once with --platform android.
The file includes only live placements, so publish your flows and activate their placements before you download it. Download it again after you change a placement or upgrade the SDK, because the file is a snapshot.
Adapty picks the file format from --sdk-version. The SDK accepts only the format it was built for and rejects any other file at startup, with no build error:
--sdk-version | File format |
|---|---|
| 4.4.0 and later | 12 |
| 4.1.x – 4.3.x | 11 |
| 4.0.x | 10 |
| 3.12.x and later 3.x | 9 |
| 3.8.x – 3.11.x | 8 |
| 3.4.x – 3.7.x | 7 |
| 3.0.x – 3.3.x | 6 |
| Below 3.0 | 5 |
Paywall placements are in every format. Flow placements are only in the files for SDK 4.0 and later.
With --output, the CLI writes the file only after the whole download succeeds, so a failed run keeps the previous file. Without it, standard output carries only the file and every error goes to standard error. A plain > file redirect empties the file before the request starts, so use --output.
Adapty builds the whole file before it answers, which can take minutes for a large app. The command sends one request and never retries. Each app can download the file 30 times per hour across all its tokens; after that, the command fails with a rate-limit error that says how long to wait. Download the file for release builds, not on every commit.
| Exit code | Meaning |
|---|---|
0 | The file was written |
1 | The file could not be written. The previous file is unchanged. |
2 | Invalid flag value |
3 | No token, or access refused |
4 | API error, including the rate limit, or an answer that is not a fallback file |
5 | Adapty could not be reached, did not answer within 300 seconds, or the download broke |