如何在带有 Monotouch for iOS 的 SQLite 中使用 FTS

2022-01-05 00:00:00 full-text-search sqlite xamarin.ios fts3

我希望使用 Monotouch 构建一个 iOS 应用程序,该应用程序具有相当大的充满文本的 sqlite 数据库.我需要提供对该文本的快速搜索.

I'm looking to build an iOS app using Monotouch that has a rather large sqlite db full of text. I need to provide fast searching over this text.

我现在最好的解决方案是 FTS 模块(最好是版本 4).我已经读到 iOS 上的默认 sqlite 实例不支持 FTS.如果这是真的,使用 Monotouch 构建 sqlite 的自定义实例的推荐方法是什么?或者这完全可以做到吗?

My best solution right now is the FTS module (preferably version 4). I have read that the default instance of sqlite on iOS does not support FTS. If this is true what is the recommended way to build a custom instance of sqlite with Monotouch? Or can this be done at all?

我发现这个网站描述了如何使用 xcode 完成此操作,但不清楚我将如何使用 Monotouch 完成此操作.
http://longweekendmobile.com/2010/06/16/sqlite-full-text-search-for-iphone-ipadyour-own-sqlite-for-iphone-and-ipad/

I found this site describing how to accomplish this with xcode, but it is not clear how I would accomplish with Monotouch.
http://longweekendmobile.com/2010/06/16/sqlite-full-text-search-for-iphone-ipadyour-own-sqlite-for-iphone-and-ipad/

非常感谢任何帮助!

推荐答案

你必须做同样的事情,构建你自己的 libsqlite3.a,并处理所有公共导出,这样它就不会与加载的 libsqlite 冲突系统,然后您需要将要绑定到 sqlite 的任何库修改为 [DllImport ("__Internal")] 而不是 libsqlite.

You would have to do the same thing, build your own libsqlite3.a, and mangle all the public exports so it doesn't conflict with the libsqlite loaded by the system, and then you would need to modify whatever library you want to bind to sqlite to [DllImport ("__Internal")] instead of libsqlite.

相关文章