-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Standardize support for Firebase products that integrate with Remote Config. #7094
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
Changes from 1 commit
91a5f0b
aa69e72
820ad6b
e5b90f7
e929711
41439fc
89e4aed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ - (instancetype)initWithAnalytics:(id<FIRAnalyticsInterop> _Nullable)analytics { | |
| self = [super init]; | ||
| if (self) { | ||
| self->_analytics = analytics; | ||
| self->_armsCache = [[NSMutableDictionary alloc] init]; | ||
| } | ||
| return self; | ||
| } | ||
|
|
@@ -37,16 +38,31 @@ - (void)logArmActive:(NSString *)key config:(NSDictionary *)config { | |
| } | ||
|
|
||
| NSDictionary *metadata = ids[key]; | ||
| if (!metadata || metadata[kPersonalizationId] == nil) { | ||
| NSString *personalizationId = metadata[kPersonalizationId]; | ||
vic-flair marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if (!metadata || personalizationId == nil) { | ||
| return; | ||
| } | ||
|
|
||
| // This gets dispatched to a serial queue, so this is OK. But even if not, it'll just possibly log | ||
| // more. | ||
| if (self->_armsCache[key] == personalizationId) { | ||
|
||
| return; | ||
| } | ||
| self->_armsCache[key] = personalizationId; | ||
|
|
||
| [self->_analytics logEventWithOrigin:kAnalyticsOriginPersonalization | ||
| name:kAnalyticsPullEvent | ||
| parameters:@{ | ||
| kArmKey : metadata[kPersonalizationId], | ||
| kArmValue : values[key].stringValue | ||
| kArmKey : key, | ||
| kArmValue : values[key].stringValue, | ||
| kPersonalizationIdKey : personalizationId, | ||
| kArmIndexKey : metadata[kArmIndex], | ||
| kGroup : metadata[kGroup] | ||
|
||
| }]; | ||
|
|
||
| [self->_analytics logEventWithOrigin:kAnalyticsOriginPersonalization | ||
| name:kAnalyticsPullEventInternal | ||
| parameters:@{kChoiceIdKey : metadata[kChoiceId]}]; | ||
| } | ||
|
|
||
| @end | ||
Uh oh!
There was an error while loading. Please reload this page.