What are the new quot;iOS data protection APIsquot;?(什么是新的“iOS 数据保护 API?)
问题描述
如果您在 Google 上搜索iphone 数据保护 API",您会看到基于新闻稿的大量点击.
If you Google "iphone data protection apis" you'll see a zillion hits based on press releases.
如果您查看 http://support.apple.com/kb/HT4175 您可以看到苹果直接做出指示.
If you check out http://support.apple.com/kb/HT4175 you can see Apple making the indication directly.
这些 API 在哪里/是什么?我在 iOS4 之前使用过旧的加密 API,所以它们不是 那些.这些 API 应该为第 3 方应用程序提供 MDM(移动设备管理)类型的功能.
Where are/what are these APIs? I've used the old crypto APIs before iOS4, so they're not those. These APIs are supposed to give MDM (Mobile Device Management)-type capability for 3rd-party apps.
TIA!
推荐答案
在将 NSData 写入磁盘时,您可以设置一些 FileProtection 选项:
There are some FileProtection options you can set when writing an NSData to disk:
NSDataWritingFileProtectionCompleteNSDataWritingFileProtectionNone)
还有一个扩展属性NSFileProtectionKey,你可以通过NSFileManager设置磁盘上预先存在的文件:
as well as an extended attribute, NSFileProtectionKey, you can set on pre-existing files on disk via NSFileManager:
NSFileProtectionCompleteNSFileProtectionNone
当您的应用程序能够(不)能够访问受保护的数据时,还会通知应用程序委托:
The app delegate is also informed of when your application is (not) going to be able to access protected data:
-applicationProtectedDataDidBecomeAvailable:-applicationProtectedDataWillBecomeUnavailable:
加密和保护数据的所有细节都由硬件和操作系统代表您处理.每当设备锁定时,它就会启动即发即弃保护.
All the gory details of encrypting and securing the data are handled by the hardware and OS on your behalf. It's fire-and-forget protection that kicks in whenever the device locks.
这篇关于什么是新的“iOS 数据保护 API"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:什么是新的“iOS 数据保护 API"?
基础教程推荐
- iOS - UINavigationController 添加多个正确的项目? 2022-01-01
- 如何将图像从一项活动发送到另一项活动? 2022-01-01
- 为什么姜饼模拟器方向卡在应用程序中? 2022-01-01
- SwiftUI-ScrollViewReader的ScrollTo不滚动 2022-01-01
- Android Volley - 如何动画图像加载? 2022-01-01
- Play 商店的设备兼容性问题 2022-01-01
- Xcode UIView.init(frame:) 只能在主线程中使用 2022-01-01
- 如何比较两个 NSDate:哪个是最近的? 2022-01-01
- navigationItem.backBarButtonItem 不工作?为什么上一个菜单仍然显示为按钮? 2022-01-01
- UIImage 在开始时不适合 UIScrollView 2022-01-01
