Skip to content

Commit

Permalink
Run sharing in main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
adappter committed Apr 3, 2020
1 parent 6b88edc commit 0191cd1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/ios/SocialSharing.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ - (void)shareWithOptions:(CDVInvokedUrlCommand*)command {
}

- (void)shareInternal:(CDVInvokedUrlCommand*)command withOptions:(NSDictionary*)options isBooleanResponse:(BOOL)boolResponse {
[self.commandDelegate runInBackground:^{ //avoid main thread block especially if sharing big files from url
if (!NSClassFromString(@"UIActivityViewController")) {
CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
Expand Down Expand Up @@ -207,7 +206,6 @@ - (void)shareInternal:(CDVInvokedUrlCommand*)command withOptions:(NSDictionary*)
}
[[self getTopMostViewController] presentViewController:activityVC animated:YES completion:nil];
});
}];
}

- (void)shareViaTwitter:(CDVInvokedUrlCommand*)command {
Expand Down

0 comments on commit 0191cd1

Please sign in to comment.