Thursday, September 29, 2022

[FIXED] What storage options exist for React Native apps on tvOS?

Issue

I have a React Native app built for tvOS that uses redux-persist, however, I see the following message in the console every time my state changes:

Persistent storage is not supported on tvOS, your data may be removed at any point.

And yes, in fact, after testing, my app lost its state overnight. Clearly Apple TV apps have some way of storing information, like who the user is. Are they all are using some API that provides the current user's Apple ID and then storing their app state in the cloud? Are there other options for storing state locally on the device?


Solution

Currently, you can only use this to get 500kb of persistent storage on tvOS with react-native.

https://github.com/kevinresol/react-native-default-preference



Answered By - Relaed
Answer Checked By - Cary Denson (PHPFixing Admin)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.