NSUserDefaults 可以用于在 tvOS 上保存数据吗?

Can NSUserDefaults be used to persist data on tvOS?

根据 Apple 文档:

"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."

这是否也排除使用 NSUserDefaults 作为持久化数据的方式?

根据 Apple Developers Forum 上的回答:

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.