I wish to use the foreign keys facility, and thus upgraded my version of sqlite to the latest stable version 3.7.2.
I've verified the version in terminal by entering in:
> whereis sqlite3
= /usr/bin/sqlite3
> sqlite3 --version
= 3.7.2
Now, when I come to create a new database using FireFox's SQL Manager plugin it reports it is using:
3.6.22
Worse still, when I go into Xcode and run a basic SQLite Select query and get a log of the version used it says:
3.6.22
How do I upgrade the sqlite开发者_开发知识库3 version used by both Firefox and Xcode, also; should I be even trying to code for the latest sqlite when a user's phone might not have it?
Thanks for your help.
Ad-hoc plug ins and managers will have an included sqlite3 version. What you are seeing is the dll's version, not the database's. Try swapping them with the latest sqlite3.dll file.
After some research, I think I am just going to ignore the FOREIGN KEY feature; there's no guarantee old ipods/iphone's would have the latest sqlite, so I'm going to re-inforce the database structure manually through code.
This question may help you: iphone sqlite static linking?
The author wanted to statically link SQlite so that he had full control over the version used in his programs. If you wanted foreign keys then this would be the way to go in order to ensure that your product worked on all devices - no matter their iOS version.
精彩评论