Re: importing sqlite data into a core data "database"
Re: importing sqlite data into a core data "database"
- Subject: Re: importing sqlite data into a core data "database"
- From: Stefan Arentz <email@hidden>
- Date: Sat, 12 Jul 2008 23:33:31 -0400
On Jul 12, 2008, at 11:25 PM, John Velman wrote:
Thanks, Chris,
Using the SQLite 3 api as you suggest sounds good, but there are a
couple
of things that must be obvious to the initiated, but not to me (yet).
As I understand, the SQLite 3 api is a C api. Can I do C function
calls
directly from Objective C? Seems plausible, since Obj C is an
extension of
C, and if I understand, Objective C is translated into C during the
compile.
Yes. Objective-C is a superset of C. Anything that works in C works in
Objective-C.
If that's OK so far, how about linking? Is Linking to the SQLite
library
transparent from XCode?
Looks like the CoreData framework is directly linked against sqlite.
So you can just include <sqlite3.h> and linkage will be fine if you
already depend on that framework. (Which you probably do :-)
% otool -L /System/Library/Frameworks/CoreData.framework/CoreData |
grep sqlite
/usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current
version 9.6.0)
The raw SQLite API is pretty simple. If you need help then I would
suggest to get the SQLite book.
http://www.apress.com/book/view/9781590596739
(The index of the book sucks, i would suggest to buy the PDF if you
don't mind reading on the screen)
S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden