Can I use NSUserDefaults with tvOS?

后端 未结 5 2117
囚心锁ツ
囚心锁ツ 2020-12-15 20:57

The App Programming Guide for tvOS briefly states that

There is no persistent local storage for apps on Apple TV. This means that every app d

5条回答
  •  旧巷少年郎
    2020-12-15 21:14

    Apple really wants you (and AppleTV customers) to sign up for and use iCloud.

    Here is the current documentation on what to do for persistent storage with AppleTV.

    The introductory paragraph:

    Storage on Apple TV is limited, and there is no guarantee that information stored on the device will be available the next time a user opens your app. Also, in order to share the user’s data across multiple devices, you need to store the user’s information somewhere other than the Apple TV. Apple provides two shared storage options for Apple TV: iCloud Key-Value Storage (KVS), and CloudKit.

    For files less than 1 meg, you'll use iCloud Key-Value Storage (KVS). For storage more than 1 Meg, you'll use CloudKit.

提交回复
热议问题