Skip to content

Conversation

@stevensJourney
Copy link
Collaborator

@stevensJourney stevensJourney commented Mar 5, 2024

Some files incorrectly imported sqlite3 with #include <sqlite3.h> instead of using the local #include "sqlite3.h".

This is mentioned in this issue https://github.com/margelo/react-native-quick-sqlite/issues/12 with the same error present in the upstream codebase https://github.com/margelo/react-native-quick-sqlite/blob/be9235eef7d892ed46177f4d4031cc1a9af723ad/cpp/sqliteBridge.cpp#L13.

This would cause issues when building iOS applications which contained the sqlite3 pod dependency as the compiler would see other SQLite3 declarations in /usr/include.

Example error:

(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/sqlite3.h:741:8)

  739 | */
  740 | typedef struct sqlite3_file sqlite3_file;
> 741 | struct sqlite3_file {
      |        ^ redefinition of 'sqlite3_file'
  742 |   const struct sqlite3_io_methods *pMethods;  /* Methods for an open file */
  743 | };

Testing:
This was tested in an Expo 50 application which uses the expo-updates NPM package which depends on the sqlite3 pod. A development package was published and used there. It was verified that the iOS build step completed successfully.

@stevensJourney stevensJourney marked this pull request as ready for review March 5, 2024 09:19
@stevensJourney stevensJourney requested a review from rkistner March 5, 2024 09:19
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

Successfully merging this pull request may close these issues.

3 participants