Local storage (Cocos)
Persistent on the device the game is running on. Ideal for preferences, caches, and anything that’s cheap to regenerate if lost.
All methods are on the FRVRSDK.instance singleton and return Promises.
Single item
Section titled “Single item”Values can be any JSON‑serializable value — the wrapper handles serialization for you (unlike the raw Web SDK, which deals in strings).
Batch (preferred for performance)
Section titled “Batch (preferred for performance)”Batch APIs save roundtrips when you have multiple keys. Use them in save/load points.
When to use local vs. cloud
Section titled “When to use local vs. cloud”| Use local storage when… | Use cloud storage when… |
|---|---|
| Data is cheap to regenerate | Losing it would ruin the player’s progress |
| It’s device‑specific (audio mute, graphics preset) | It should follow the player across devices |
| You don’t need the player to be logged in | The player has a FRVR auth session |
Game saves, unlocks, and IAP‑granted content belong in cloud storage. Preferences and caches belong in local storage.