iOS - Utiliser les fallbacks
To maintain a fluid user experience, it is important to set up fallbacks for your flows, paywalls, and onboardings. This precaution extends the application’s capabilities in case of partial or complete loss of internet connection.
-
If the application cannot access Adapty servers:
It will be able to display a fallback flow or paywall, and access the local onboarding configuration.
-
If the application cannot access the internet:
It will be able to display a fallback flow or paywall. Onboardings include remote content and require an internet connection to function.
Before you follow the steps in this guide, download the fallback configuration files from Adapty.
Configuration
- Ajoutez le fichier JSON de secours à votre bundle de projet : ouvrez le menu File dans XCode et sélectionnez l’option Add Files to “YourProjectName”.
- Appelez la méthode
.setFallbackavant de récupérer le flow, le paywall ou l’onboarding cible.
Paramètres :
| Paramètre | Description |
|---|---|
| fileURL | Chemin vers le fichier de configuration de secours. |