You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the community interested in officially adding support for tvOS to the react-native-async-storage library?
As the usage of React Native expands to different platforms, including tvOS, it becomes important to ensure that widely-used libraries such as react-native-async-storage are compatible with tvOS applications.
Persistent storage is not supported on tvOS, your data may be removed at any point.
The current implementation is not ideal because the operating system may delete the cache. In Apple's App Programming Guide for tvOS, it is recommended to use NSUserDefaults.
Local Storage for Your App Is Limited
The maximum size for a tvOS app bundle 4 GB. Moreover, your app can only access 500 KB of persistent storage that is local to the device (using the NSUserDefaults class). Outside of this limited local storage, all other data must be purgeable by the operating system when space is low.
Using NSUserDefault for tvOS storage introduces its own limitations, such as the 500 KB limit.
If the community is interested in changing the implementation for tvOS, I would be happy to discuss more details and draft a proposal.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is the community interested in officially adding support for tvOS to the react-native-async-storage library?
As the usage of React Native expands to different platforms, including tvOS, it becomes important to ensure that widely-used libraries such as react-native-async-storage are compatible with tvOS applications.
The current implementation for tvOS uses a system purgeable cache, NSCachesDirectory, and shows the warning message:
The current implementation is not ideal because the operating system may delete the cache. In Apple's App Programming Guide for tvOS, it is recommended to use
NSUserDefaults
.Using NSUserDefault for tvOS storage introduces its own limitations, such as the 500 KB limit.
If the community is interested in changing the implementation for tvOS, I would be happy to discuss more details and draft a proposal.
Beta Was this translation helpful? Give feedback.
All reactions