[英]How do I save additional content into my UIManagedDocument file packages?
[英]How to get UIManagedDocument to show up as a file package and not a folder
我正在使用基于Core Data文档的应用程序,使用UIManagedObject子类作为我的存储容器。
保存文件(到iTunes文件共享)时,文件显示为文件夹,而不是文件包。 我希望它显示为单个文件,以便用户不会意外地弄乱文件结构。
这是我到目前为止所做的。 在我的子类中:
@implementation
- (NSString *)savingFileType {
return @"com.app.filetype";
}
- (NSString *)fileNameExtensionForType:(NSString *)typeName
saveOperation:(UIDocumentSaveOperation)saveOperation {
return @"ext";
}
@end
在目标信息中,我注册了导出的UTI:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.