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

Block calls to get config until DB load completes #7975

Merged
merged 3 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions FirebaseRemoteConfig/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased
- [fixed] Fixed throttling issue when fetch fails due to no network. (#6628)
- [fixed] Fixed issue where sometimes the local config returned is empty. (#7424)

# v7.10.0
- [changed] Throw exception if projectID is missing from FirebaseOptions. (#7725)
Expand Down
4 changes: 1 addition & 3 deletions FirebaseRemoteConfig/Sources/RCNConfigContent.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ - (instancetype)initWithDBManager:(RCNConfigDBManager *)DBManager {
_bundleIdentifier = @"";
}
_DBManager = DBManager;
// Waits for both config and Personalization data to load.
_configLoadFromDBSemaphore = dispatch_semaphore_create(1);
_configLoadFromDBSemaphore = dispatch_semaphore_create(0);
[self loadConfigFromMainTable];
}
return self;
Expand Down Expand Up @@ -128,7 +127,6 @@ - (void)loadConfigFromMainTable {
NSDictionary *activePersonalization, NSDictionary *defaultConfig) {
self->_fetchedPersonalization = [fetchedPersonalization copy];
self->_activePersonalization = [activePersonalization copy];
karenyz marked this conversation as resolved.
Show resolved Hide resolved
dispatch_semaphore_signal(self->_configLoadFromDBSemaphore);
}];
}

Expand Down