OP-Engineering / op-sqlite

Fastest SQLite library for react-native by @ospfranco
MIT License
389 stars 22 forks source link

Trying to use this library with Sqlite.swift #93

Closed humaidk2 closed 1 week ago

humaidk2 commented 1 week ago

Hi,

When I try to build this library with sqlite.swift

It fails on ci, with a bunch of errors on redefinition of sqlite3

fix error: redefinition of 'sqlite3_mutex_methods'

I have updated to the latest version of both op-sqlite and sqlite.swift and added the following to my package.json "op-sqlite": { "iosSqlite": false }

Any ideas on how to fix this issue would be appreciated. I really want the benefits of c++ op-sqlite and the cleanliness of sqlite.swift in my ios modules

ospfranco commented 1 week ago

They are both trying to compile and import sqlite, you will have to figure out yourself how to exclude one from the compilation process, but I don't think it will be possible since both need to include the headers during compilation.

You should better ask in StackOverflow, nothing wrong with this library.

humaidk2 commented 1 week ago

Thanks for quick response,

will post my findings if I do

humaidk2 commented 1 week ago

Fixed Someone in sqlite.dart had similar issue and fixed it by installing sqlite.swift as a standalone version sqlite dart

I updated my podfile in a similar fashion and it seems to fix the issue ` pod 'SQLite.swift/standalone', '~> 0.15.3'

pod 'sqlite3', :modular_headers => true `

ospfranco commented 1 week ago

Nice!