我想在本地保存一个UIDocument(用于当用户的iCloud关闭)。这被证明是一个挑战。每次我尝试保存它时,保存都会失败。我可以访问哪些错误?有没有人知道为什么会失败?谢谢!保存UIDocument本地
0
A
回答
0
从上UIDocument文档:
- (void)handleError:(NSError *)error userInteractionPermitted:(BOOL)userInteractionPermitted
This method is called by the default implementations of openWithCompletionHandler: and saveToURL:forSaveOperation:completionHandler: when UIDocument encounters a reading or writing error, respectively.`
如果实施此方法,你应该能够检查NSError在那里,以确定故障的原因。
+0
我现在用的是saveToURL方法,它调用你所提到的方法。这种方法没有任何错误信息,但是 –
+0
@ClintWarner:看的HandleError:userInteractionPermitted:为UIDocument的文件中。回答编辑。 –
相关问题
- 1. UIDocument自动保存不起作用
- 2. iCloud保存数据随着UIDocument崩溃
- 3. 关闭UIDocument后停止自动保存
- 4. 保存到URL的UIDocument失败?
- 5. 保存文件时使用自动保存的UIDocument
- 6. 保存在本地存储
- 7. 将本地存储模型保存到本地存储
- 8. 在本地保存文件
- 9. Android:本地保存录音?
- 10. 本地文件blob保存
- 11. 保存本地javascript变化
- 12. 本地保存PDF在IOS
- 13. 尽管指示成功,UIDocument仍未保存到文件
- 14. 保存UIDocument到iCloud给我NSCocoaErrorDomain代码= 4
- 15. 为什么在自动保存我的UIDocument之后调用loadFromContents?
- 16. UIDocument&NSFileWrapper - NSFastEnumerationMutationHandler在保存期间更改文件包装
- 17. 将视频保存到本地存储
- 18. JavaScript保存到本地存储?
- 19. HTML5本地存储来保存笔记
- 20. 如何保存到本地存储
- 21. 我如何保存在本地存储
- 22. 将令牌保存到本地存储
- 23. 将数据保存到本地存储
- 24. JQGrid - 将colmodel保存到本地缓存
- 25. 将数据保存到本地存储
- 26. 保存到本地存储onkeyup
- 27. 如何让本地HTML将文本保存到本地文件?
- 28. 在哪里存储UIDocument的预览?
- 29. 在UIDocument中存储音频文件
- 30. 使用NSFileWrapper在Uidocument中存储BOOL
是什么UIDocument和UIManagedDocument之间的区别? –
这里,看看这个http://stackoverflow.com/questions/11933055/uidocument-openwithcompletionhandler-crash,也是一个教程来检查你的工作流程http://www.raywenderlich.com/12779/icloud-and-uidocument-beyond-在-基础知识部分-1 – DogCoffee