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
FlagRequiredDescription
--appYesApp ID (UUID)
--platformYesios for the App Store or android for Google Play. macOS and visionOS apps use the ios file.
--sdk-versionYesThe 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.
--outputNoFile 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-versionFile format
4.4.0 and later12
4.1.x – 4.3.x11
4.0.x10
3.12.x and later 3.x9
3.8.x – 3.11.x8
3.4.x – 3.7.x7
3.0.x – 3.3.x6
Below 3.05

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 codeMeaning
0The file was written
1The file could not be written. The previous file is unchanged.
2Invalid flag value
3No token, or access refused
4API error, including the rate limit, or an answer that is not a fallback file
5Adapty could not be reached, did not answer within 300 seconds, or the download broke