I am trying to build a simple SQLite full text search (FTS4) for an iOS 9/Xcode 7 project w/ Swift 2.2. I am accessing the SQLite3 C API directly with Swift, I see no need to use a bloated wrapper library. I have the full text search working perfectly. Now I need to create a ranking function for the results. I already have the C code for the ranking function, the problem is I have no idea how to:
- Get the C source or compiled executable of the ranking function code into the compiled iOS project.
- Create or Load the ranking function within SQLite (sqlite3_create_function)
- Have SQLite recognize the created function
So basically, I have the C source code of the ranking function and have failed at every attempt to get SQLite to recognize the function.
Thanks for you help.