如何在iPhone上将sqlite ReadOnly更改为ReadWrite? [英] How can i change sqlite ReadOnly to ReadWrite on the iPhone?

查看:109
本文介绍了如何在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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆