Skip to content

Commit

Permalink
style: tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed May 23, 2017
1 parent bc7c25d commit 545ae67
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/ios/BranchSDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ - (void)initSession:(CDVInvokedUrlCommand*)command
if (!jsonData) {
NSLog(@"Parsing Error: %@", [err localizedDescription]);
NSDictionary *errorDict = [NSDictionary dictionaryWithObjectsAndKeys:[err localizedDescription], @"error", nil];
NSData* errorJSON = [NSJSONSerialization dataWithJSONObject:errorDict
options:NSJSONWritingPrettyPrinted
error:&err];
NSData* errorJSON = [NSJSONSerialization dataWithJSONObject:errorDict options:NSJSONWritingPrettyPrinted error:&err];

resultString = [[NSString alloc] initWithData:errorJSON encoding:NSUTF8StringEncoding];
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:resultString];
Expand All @@ -113,9 +111,7 @@ - (void)initSession:(CDVInvokedUrlCommand*)command

// We create a JSON string result, because we're getting an error if we directly return a string result.
NSDictionary *errorDict = [NSDictionary dictionaryWithObjectsAndKeys:[error localizedDescription], @"error", nil];
NSData* errorJSON = [NSJSONSerialization dataWithJSONObject:errorDict
options:NSJSONWritingPrettyPrinted
error:&error];
NSData* errorJSON = [NSJSONSerialization dataWithJSONObject:errorDict options:NSJSONWritingPrettyPrinted error:&error];

resultString = [[NSString alloc] initWithData:errorJSON encoding:NSUTF8StringEncoding];
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:resultString];
Expand Down Expand Up @@ -147,7 +143,7 @@ - (void)setDebug:(CDVInvokedUrlCommand*)command
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:enableDebug];

[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
}
}

- (void)getAutoInstance:(CDVInvokedUrlCommand*)command
{
Expand Down Expand Up @@ -513,10 +509,7 @@ - (void)showShareSheet:(CDVInvokedUrlCommand*)command
}
}

[branchUniversalObj showShareSheetWithLinkProperties:linkProperties
andShareText:shareText
fromViewController:self.viewController
completion:^(NSString *activityType, BOOL completed) {
[branchUniversalObj showShareSheetWithLinkProperties:linkProperties andShareText:shareText fromViewController:self.viewController completion:^(NSString *activityType, BOOL completed) {

int listenerCallbackId = [[command.arguments objectAtIndex:0] intValue];

Expand Down Expand Up @@ -579,9 +572,7 @@ - (void)listOnSpotlight:(CDVInvokedUrlCommand*)command {
CDVPluginResult* pluginResult = nil;
if (!error) {
NSError *err;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:@{@"result":string}
options:0
error:&err];
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:@{@"result":string} options:0 error:&err];
if (!jsonData) {
NSLog(@"Parsing Error: %@", [err localizedDescription]);
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[err localizedDescription]];
Expand Down

0 comments on commit 545ae67

Please sign in to comment.