Skip to content

Commit

Permalink
style: spacing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Jan 9, 2017
1 parent d5ce036 commit 80e1e12
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/ios/BranchSDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ - (void)initSession:(CDVInvokedUrlCommand*)command

if (!error) {
if (params != nil && [params count] > 0 && isFromBranchLink) {

NSError *err;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:params options:0 error:&err];

Expand Down Expand Up @@ -136,7 +136,7 @@ - (void)initSession:(CDVInvokedUrlCommand*)command
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:@"BSDKPostUnhandledURL" object:self.deepLinkUrl]];
}
self.deepLinkUrl = nil;

if (command != nil) {
[self.commandDelegate sendPluginResult: pluginResult callbackId: command.callbackId];
}
Expand All @@ -147,7 +147,7 @@ - (void)setMixpanelToken:(CDVInvokedUrlCommand*)command
{

[[Branch getInstance] setRequestMetadataKey:@"$mixpanel_distinct_id" value:[command.arguments objectAtIndex:0]];

}

- (void)setDebug:(CDVInvokedUrlCommand*)command
Expand Down Expand Up @@ -208,10 +208,10 @@ - (void)setIdentity:(CDVInvokedUrlCommand*)command
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:params];
}
else {

pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[error localizedDescription]];
}

[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
}];
}
Expand All @@ -227,6 +227,7 @@ - (void)userCompletedAction:(CDVInvokedUrlCommand*)command
{
NSString *name;
NSDictionary *state;

// if a state dictionary is passed as an argument
if ([command.arguments count] == 2) {
name = [command.arguments objectAtIndex:0];
Expand All @@ -245,7 +246,7 @@ - (void)userCompletedAction:(CDVInvokedUrlCommand*)command
[branch userCompletedAction:name];
}

// TODO: need to resolve according to result of userCompletedAction, but no callback version of the method is exposed.
// TODO: iOS Branch.userCompletedAction needs a callback for success or failure
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString: @"Success"];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
}
Expand Down Expand Up @@ -417,7 +418,7 @@ - (void)createBranchUniversalObject:(CDVInvokedUrlCommand*)command
- (void)registerView:(CDVInvokedUrlCommand*)command
{
int branchUniversalObjectId = [[command.arguments objectAtIndex:0] intValue];

NSMutableDictionary *branchUniversalObjDict = [self.branchUniversalObjArray objectAtIndex:branchUniversalObjectId];
BranchUniversalObject *branchUniversalObj = [branchUniversalObjDict objectForKey:@"branchUniversalObj"];

Expand Down Expand Up @@ -532,7 +533,7 @@ - (void)showShareSheet:(CDVInvokedUrlCommand*)command
completion:^(NSString *activityType, BOOL completed) {

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

if (completed) {
NSLog(@"Share link complete");
[branchUniversalObj getShortUrlWithLinkProperties:linkProperties andCallback:^(NSString *url, NSError *error) {
Expand All @@ -542,7 +543,7 @@ - (void)showShareSheet:(CDVInvokedUrlCommand*)command
}
}];
}

CDVPluginResult *shareDialogDismissed = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];

NSMutableDictionary *branchUniversalObjDict = [self.branchUniversalObjArray objectAtIndex:listenerCallbackId];
Expand Down Expand Up @@ -615,7 +616,7 @@ - (void)postUnhandledURL:(NSNotification *)notification {
// We create a JSON string result, because we're unable to handle the url. We will include the url in the return string.
NSError *error;
NSString *urlString;

// if ([notification.object respondsToSelector:@selector(absoluteString:)]) {
SEL selector = NSSelectorFromString(@"absoluteString:");
if ([notification.object respondsToSelector:selector]) {
Expand Down

0 comments on commit 80e1e12

Please sign in to comment.