Skip to content

Remote Config does not work with custom SQLite3 libraries #10884

@aaron-foreflight

Description

@aaron-foreflight

Description

Currently SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION is passed to sqlite3_open_v2(...) in - (void)createOrOpenDatabase in RCNConfigDBManager.m.

If an app eschews the standard Apple sqlite3 library shipped on iOS and uses their own custom sqlite3 build with source directly from the SQLite3 repo, the SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION flag does not exist as Apple has only implemented this in their version of sqlite3 and not contributed it back to the main repo.

We cannot use the Apple's sqlite3 implementation as we need additional spatial querying capabilities built into the library for our application. It would be useful if Remote Config checked if the flag exists before using it.

e.g.:

#ifdef SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION
    int flags = SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE |
                SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION |
                SQLITE_OPEN_FULLMUTEX;

#else
    int flags = SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE |
                SQLITE_OPEN_FULLMUTEX;
#endif

Reproducing the issue

No response

Firebase SDK Version

10.6.0

Xcode Version

14.2.0

Installation Method

Swift Package Manager

Firebase Product(s)

Remote Config

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions