我可以在 tvOS 中使用 NSUserDefaults 吗? [英] Can I use NSUserDefaults with tvOS?

查看:54
本文介绍了我可以在 tvOS 中使用 NSUserDefaults 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tvOS 应用程序编程指南 简要指出

<块引用>

Apple TV 上的应用没有持久的本地存储.这意味着为新 Apple TV 开发的每个应用都必须能够在 iCloud 中存储数据并以提供出色客户体验的方式检索数据.

这是否意味着 NSUserDefaults 不可用?哪些机制可用于数据存储?

解决方案

据 devforums 上的一位 Apple Staff 成员所说,您可以在 tvOS 上使用 NSUserDefaults 来处理高达 500 kb 的数据:

https://forums.developer.apple.com/message/50696#50696

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

Does this mean NSUserDefaults is unavailable? What mechanisms are available for data storage?

解决方案

According to an Apple Staff member on the devforums, you can use NSUserDefaults on tvOS for up to 500 kb of data:

https://forums.developer.apple.com/message/50696#50696

这篇关于我可以在 tvOS 中使用 NSUserDefaults 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆