Skip to content

Commit 8039329

Browse files
committed
deprecate setLogLevel: to be replaced with enableLogs(boolean)
1 parent 8b29acc commit 8039329

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

ios/One.m

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ @implementation RCTOne
1818
[One disableAutomaticInteractionDetection:YES];
1919
}
2020

21-
RCT_EXPORT_METHOD(setLogLevel:(OneLogLevel)level)
21+
RCT_EXPORT_METHOD(enableLogging:(BOOL)enable)
2222
{
23-
[One setLogLevel:level];
23+
[One setLogLevel:enable ? kOneLogLevelAll : kOneLogLevelNone];
2424
}
2525

2626
RCT_EXPORT_METHOD(sendInteraction:(NSString *)interaction
@@ -65,8 +65,6 @@ @implementation RCTOne
6565
{
6666
// Calling this method opts the user back in to match Android wipe and replace behavior.
6767
[One opt:In forOptions:AllTracking];
68-
69-
NSNumber *optOutValue = call.arguments[@"optOut"];
7068
[One opt:optOut ? Out : In forOptions:CityCountryDetection];
7169
}
7270

@@ -95,15 +93,4 @@ + (BOOL)requiresMainQueueSetup
9593
return YES;
9694
}
9795

98-
- (NSDictionary *)constantsToExport
99-
{
100-
return @{
101-
@"LogLevelNone" : @(kOneLogLevelNone),
102-
@"LogLevelAll" : @(kOneLogLevelAll),
103-
@"LogLevelWebService" : @(kOneLogLevelWebService),
104-
@"LogLevelFramework" : @(kOneLogLevelFramework)
105-
};
106-
}
107-
108-
10996
@end

0 commit comments

Comments
 (0)