如何在iPhone上将sqlite ReadOnly更改为ReadWrite?

编程入门 行业动态 更新时间:2024-10-13 18:26:11
本文介绍了如何在iPhone上将sqlite ReadOnly更改为ReadWrite?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我将我的应用程序部署到我的iPhone并获得

i deployed my App to my iPhone and get

调用sqlite3_step的未知错误(8:尝试编写只读数据库)eu 。

在模拟器上它一切正常。

On the Simulator it all works like it should.

我的sqlite数据库放在资源文件夹(Xcode)中。

My sqlite Database is placed in the Resource Folder (Xcode).

感谢您的帮助!

推荐答案

您的应用程序包在iPhone上无法写入。您必须将文件复制到其他位置,例如文档文件夹。它可以在模拟器中运行,因为Mac不会强制执行iPhone所有的沙盒限制。

Your application bundle is not writable on the iPhone. You MUST copy the file somewhere else, like your documents folder. It works in the simulator because the Mac does not enforce all the sandboxing restrictions the iPhone does.

更多推荐

如何在iPhone上将sqlite ReadOnly更改为ReadWrite?

本文发布于:2023-10-27 10:37:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1533121.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上将   如何在   iPhone   ReadWrite   sqlite

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!