Skip to content

Commit b3e4928

Browse files
author
Aaron Lopez
authored
Merge pull request #501 from trelee/master
Fix: iOS disableTracking can now also be used to enable tracking
2 parents a1d8265 + 7fbcaae commit b3e4928

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ios/BranchSDK.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,8 @@ - (void)setRequestMetadata:(CDVInvokedUrlCommand*)command
121121
- (void)disableTracking:(CDVInvokedUrlCommand*)command
122122
{
123123

124-
bool enabled = [[command.arguments objectAtIndex:0] boolValue] == YES;
125-
if (enabled) {
126-
[Branch setTrackingDisabled:enabled];
127-
}
124+
bool enabled = [[command.arguments objectAtIndex:0] boolValue];
125+
[Branch setTrackingDisabled:enabled];
128126

129127
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:enabled];
130128

0 commit comments

Comments
 (0)