Skip to content

Commit

Permalink
remove call backs that crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly Pangburn committed Dec 4, 2019
1 parent 1b3d315 commit 142163f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ios/RNShare.m
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ - (NSDictionary *)constantsToExport

UIViewController *controller = RCTPresentedViewController();
shareController.completionWithItemsHandler = ^(NSString *activityType, BOOL completed, __unused NSArray *returnedItems, NSError *activityError) {
if (activityError) {
failureCallback(activityError);
} else if (completed || activityType == nil) {
successCallback(@[@(completed), RCTNullIfNil(activityType)]);
}
// bind does not care about call backs
// if (activityError) {
// failureCallback(activityError);
// } else
// if (completed || activityType == nil) {
// successCallback(@[@(completed), RCTNullIfNil(activityType)]);
// }
};

shareController.modalPresentationStyle = UIModalPresentationPopover;
Expand Down

0 comments on commit 142163f

Please sign in to comment.