尝试通过图像选择器从照片库获取照片时应用程序崩溃
有人在尝试使用图像选择器访问照片库时遇到过此错误吗?
NSInvalidArgumentException Cannot set metadata in read-only store.
任何有关实际问题的建议以及如何解决此问题的建议将不胜感激。
错误堆栈的快照如下所示
Anyone encountered this error before when trying to access the photo library using the image picker?
NSInvalidArgumentException Cannot set metadata in read-only store.
Any advise on what actually went wrong and suggestions on how I can resolve this will be greatly appreciated.
A snapshot of the error stack is shown below
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
开发者论坛上有一篇帖子,可能会有点帮助(奇怪的是,它标记为“Apple 机密信息”)尽管 iOS 5 已经发布)。
我们也一直看到这些。我的第一印象是它与未连接到 iCloud 时使用 PhotoStream 有关,但“recordVersion:forStore:”表明它正在尝试将照片库升级到 5.0 格式(作为非特权/沙盒,它可能无法做到这一点) /etc 进程)。
除了“与 iTunes 同步”之外,以下操作可能会解决该问题:
这似乎在 OS 5.0.1 中并未得到修复,但报告数量已大幅减少,表明人们的照片库最终正在升级。
There's a post on the dev forums which might be slightly helpful (it's curiously marked "Apple Confidential Information" despite iOS 5 being released).
We've been seeing these too. My first impression was that it was related to using PhotoStream while not being connected to iCloud, but "recordVersion:forStore:" suggests it's trying to upgrade the photo library to the 5.0 format (which it presumably can't do as an unprivileged/sandboxed/etc process).
In addition to "sync with iTunes", the following things might fix the problem:
This doesn't seem to have been fixed in OS 5.0.1, but the number of reports has drastically reduced, suggesting people's photo libraries are eventually being upgraded.
这个问题仅限于 IOS5 - 已在开发论坛上询问 Apple,但没有答案。我无法重现自己,但是..
我的 beta 测试人员报告说,与 iTunes 同步似乎可以清除此错误 - 所以我的猜测是 iTunes 同步正在修复权限问题。
我将此代码包装在 @try/@catch 中,但它仍然崩溃:(。
当我调用 UIImageWriteToSavedPhotosAlbum 时,其他用户也很少/不可重现地遇到相同的崩溃
This issue is IOS5 only- have asked Apple on the dev forums, but no answer. I have not been able to repro myself, but..
My beta testers reported that syncing with iTunes seems to clear this error up- so my guess is that iTunes sync is fixing a permissions problem.
I wrapped this code in a @try/@catch but it's still crashing :(.
also getting the same crash infrequently/non-reproducibly for other users when I call UIImageWriteToSavedPhotosAlbum