File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,8 @@ - (void)handleOpenURLNotification:(NSNotification *)notification
7777 resolve:(RCTPromiseResolveBlock)resolve
7878 reject:(__unused RCTPromiseRejectBlock)reject)
7979{
80- // TODO: we should really report success/failure via the promise here
81- // Doesn't really matter what thread we call this on since it exits the app
82- [RCTSharedApplication () openURL: URL];
83- resolve (@YES );
80+ BOOL opened = [RCTSharedApplication () openURL: URL];
81+ resolve (@(opened));
8482}
8583
8684RCT_EXPORT_METHOD (canOpenURL:(NSURL *)URL
Original file line number Diff line number Diff line change @@ -26,14 +26,14 @@ - (dispatch_queue_t)methodQueue
2626RCT_EXPORT_METHOD (setString:(NSString *)content)
2727{
2828 UIPasteboard *clipboard = [UIPasteboard generalPasteboard ];
29- clipboard.string = content;
29+ clipboard.string = ( content ? : @" " ) ;
3030}
3131
3232RCT_EXPORT_METHOD (getString:(RCTPromiseResolveBlock)resolve
3333 rejecter:(__unused RCTPromiseRejectBlock)reject)
3434{
3535 UIPasteboard *clipboard = [UIPasteboard generalPasteboard ];
36- resolve (RCTNullIfNil (clipboard.string ));
36+ resolve ((clipboard.string ? : @" " ));
3737}
3838
3939@end
You can’t perform that action at this time.
0 commit comments