Skip to content

Commit

Permalink
Make use of SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTI…
Browse files Browse the repository at this point in the history
…CATION conditional. (#12548)
  • Loading branch information
cprince-foreflight authored Apr 22, 2024
1 parent 020264b commit d5b3519
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions FirebaseRemoteConfig/Sources/RCNConfigDBManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,12 @@ - (void)createOrOpenDatabase {
if (!RemoteConfigCreateFilePathIfNotExist(dbPath)) {
return;
}
int flags = SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE |
SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION |
SQLITE_OPEN_FULLMUTEX;

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

if (sqlite3_open_v2(databasePath, &strongSelf->_database, flags, NULL) == SQLITE_OK) {
// Always try to create table if not exists for backward compatibility.
if (![strongSelf createTableSchema]) {
Expand Down

0 comments on commit d5b3519

Please sign in to comment.