Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion OptimizelySDKCore/OptimizelySDKCore/OPTLYEventBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ - (NSDictionary *)createCommonParams:(OPTLYProjectConfig *)config userId:(NSStri
params[OPTLYEventParameterKeysClientEngine] = [OPTLYEventBuilderDefault stringOrEmpty:[config clientEngine]];
params[OPTLYEventParameterKeysClientVersion] = [OPTLYEventBuilderDefault stringOrEmpty:[config clientVersion]];
params[OPTLYEventParameterKeysRevision] = [OPTLYEventBuilderDefault stringOrEmpty:config.revision];
params[OPTLYEventParameterKeysAnonymizeIP] = config.anonymizeIP ? @YES : @NO;
params[OPTLYEventParameterKeysAnonymizeIP] = [config.anonymizeIP boolValue] ? @YES : @NO;

return [params copy];
}
Expand Down
2 changes: 1 addition & 1 deletion OptimizelySDKCore/OptimizelySDKCore/OPTLYProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_END
/// Datafile Revision number
@property (nonatomic, strong, nonnull) NSString *revision;
/// Flag for IP anonymization
@property (nonatomic, assign) BOOL anonymizeIP;
@property (nonatomic, assign) NSNumber<Optional> *anonymizeIP;
/// List of Optimizely Experiment objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYExperiment> *experiments;
/// List of Optimizely Event Type objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ - (void)testInitWithAnonymizeIPFalse {
NSData *datafile = [OPTLYTestHelper loadJSONDatafileIntoDataObject:kDatafileNameAnonymizeIPFalse];
OPTLYProjectConfig *projectConfig = [[OPTLYProjectConfig alloc] initWithDatafile:datafile];

XCTAssertFalse(projectConfig.anonymizeIP, @"IP anonymization should be set to false.");
XCTAssertFalse([projectConfig.anonymizeIP boolValue], @"IP anonymization should be set to false.");
}

#pragma mark - Test getExperimentForKey:
Expand Down