Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 xcode 中的 iOS 模拟器上运行 SQLite 搜索程序,它运行良好,但是,当我在我的 iPhone 上运行它时,它给我一个错误说“错误打开!:14”我猜它是数据库路径,但我不知道该怎么做才能解决它。
文件路径:
NSArray *arrayPathComponent=[NSArray arrayWithObjects:NSHomeDirectory(),@"Documents",@"yourdatabasename.sqlite",nil]; destinationPath=[NSString pathWithComponents:arrayPathComponent];
使用此目标路径进行数据库操作。但是在此路径上创建您的数据库。这也适用于您的设备。