Compiling custom SQLite for an iPhone app

前端 未结 3 730
梦毁少年i
梦毁少年i 2020-12-09 05:35

I\'m trying to compile the SQLite amalgamation source into my iPhone app (to give me access to the full-text searching functionality that isn\'t available in the iPhone-comp

相关标签:
3条回答
  • 2020-12-09 06:14

    Try it with this steps:

    1. xcode menu -> project -> new target -> static library -> target name: SQLite
    2. drop SQLite amalgamation source into the project, now you can select the target, choose SQLite
    3. xcode menu -> project -> edit active target -> tab General -> Direct Dependencies -> add SQLite
    4. tab General -> Linked Libraries -> add your SQLite
    0 讨论(0)
  • 2020-12-09 06:18

    That type of error usually means a missing framework.

    1. Right- or control-click on your Project's Frameworks folder.
    2. Select Add > Existing Framework...
    3. Go to: Macintosh HD > Developer > Platforms > iPhoneOS.platform > Developer > SDKs > iPhoneOS2.2sdk > usr > lib and select libsqlite3.dylib
    4. Rebuild your project

    That should take care of it, I think. You may need to add a similar library for running on the iPhone Simulator.

    0 讨论(0)
  • 2020-12-09 06:22

    I've managed to do this using the amalgamation and dumped it straight into my project without having to do the linking catlan suggested (I'm not saying it's a bad idea, merely it's possible to do in the main project).

    I didn't need to edit anything (except for adding the necessary FTS define for the text searching) and compiled error free. Check your build settings and ensure '-sqlite3' isn't in your Other Linking Flags.

    0 讨论(0)
提交回复
热议问题