Search code examples
xcodeswifttvosapple-tv

tvOS - Best way to manage downloaded videos and images while app is running


I read that there is no persistent local storage for tvOS. Any data stored or any downloaded data will get erased at any time.

Then what is the best way to keep track of images and videos downloaded while app is running? I'm planning to make an app that is basically a slideshow of images and videos. Images/Vidoes will be downloading in the background during the slideshow.

Number of images/videos could get large, so when I try to show video, the video might have been deleted.


Solution

  • There is no persistent local storage for apps on Apple TV. This means that every app developed for the new Apple TV must be able to store data in iCloud and retrieve it in a way that provides a great customer experience.

    Only 1mb can be stored using NSUserDefaults.

    I think your best bet is to use iCloud.

    Source : https://developer.apple.com/library/prerelease/tvos/documentation/General/Conceptual/AppleTV_PG/