No local storage, what about settings, state?

According to this: https://developer.apple.com/library/prerelease/tvos/documentation/General/Conceptual/AppleTV_PG/


There is no persistent local storage for apps on the Apple TV.


This seems somewhat odd. What if I have an app with different settings customized to the user? Do they lose all those settings? Or is there a special case for something like NSUserDefaults?

Answered by Technology Evangelist in 50696022

NSUserDefaults is allowed, and supports up to 500KB of data.


You can also store content locally using the application temp and cache directories, but note that this data will be purged.


Beyond the above 500 KB limit, you will need to utilize either CloudKit or some other off device means of data storage. This could include your own web services implementation, for example.

To Clarify: If I'm using NSUserDefaults to store a boolean value for an IAP, will that value be persistant as long as it is under 500kb? For now this seems to work in my app but I'm uncertain if the 500kb you mentioned will at some point be purged.


Thanks

Nick

The behaviour is the same as on iOS: NSUserDefaults is persistent as long as the user does not delete the app from the device.

No local storage, what about settings, state?
 
 
Q