Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use op-sqlite with react-native-firebase #76

Closed
arthur-fontaine opened this issue Mar 27, 2024 · 3 comments
Closed

Unable to use op-sqlite with react-native-firebase #76

arthur-fontaine opened this issue Mar 27, 2024 · 3 comments

Comments

@arthur-fontaine
Copy link

arthur-fontaine commented Mar 27, 2024

Describe the bug
When I use op-sqlite with react-native-firebase, it throws an error when I run expo run:ios. The error is a repetition of something like this:

› Compiling @op-engineering/op-sqlite Pods/op-sqlite » bindings.cpp

❌  (node_modules/@op-engineering/op-sqlite/cpp/sqlite3.h:729:8)

  727 | */
  728 | typedef struct sqlite3_file sqlite3_file;
> 729 | struct sqlite3_file {
      |        ^ redefinition of 'sqlite3_file'
  730 |   const struct sqlite3_io_methods *pMethods; /* Methods for an open file */
  731 | };
  732 | 

In my research, I found this issue GetStream/stream-chat-react-native#2123 that maybe related to this one.
As suggested in this issue, I tried to run OP_SQLITE_USE_PHONE_VERSION=1 npx pod-install, but it does not solve the error.

Versions:

  • OS and version: iOS 17
  • op-sqlite version: 3.0.7
  • RN version: 0.73.6
  • Expo version: 50.0.14
  • New Architecture: Yes and no (both does not work)

Reproducible example

https://github.com/arthur-fontaine/repro-op-sqlite-firebase-incompatible

Steps:

  • npm i
  • npx expo prebuild --clean
  • npm run ios
@ospfranco
Copy link
Contributor

use_frameworks breaks everything unfortunately. You can give this a try in your podfile:

  pre_install do |installer|
    installer.pod_targets.each do |pod|
      if pod.name.eql?('op-sqlite')
        def pod.build_type
          Pod::BuildType.static_library
        end
      end
    end
  end

I thought I added it to the docs but I will check again.

@ospfranco
Copy link
Contributor

Yeah I did

https://ospfranco.notion.site/Installation-93044890aa3d4d14b6c525ba4ba8686f

RTFM please :)

@arthur-fontaine
Copy link
Author

Yeah I did

https://ospfranco.notion.site/Installation-93044890aa3d4d14b6c525ba4ba8686f

RTFM please :)

I didn't see it, it was late, I'm sorry. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants