Share.shareSingle() throws unhandled promise rejection only on ios
See original GitHub issueHi. this library is working fine on all cases on android but i am running into few issues on ios. My implementation of this lib is with a custom view component with icons when clicked will initiate the sharing process.
Environment:
"react": "16.2.0",
"react-native": "^0.53.3"
"react-native-share": "^1.0.27"
Using share as: import Share from 'react-native-share';
I have a facebook icon when pressed calls:
this.props.setTimeout(() => { Share.shareSingle({ ...this.state.shareOptions, social: 'facebook' }) }, 50);
Android produces desired behaviour however on ios i get the warning below.
Possible Unhandled Promise Rejection (id: 0):
Object {
"error": Object {
"code": "ECOM.RNSHARE1",
"domain": "com.rnshare",
"message": "The operation couldn’t be completed. Not installed",
"nativeStackIOS": Array [
"0 TestApp 0x000000010ff94b26 RCTJSErrorFromCodeMessageAndNSError + 134",
"1 TestApp 0x000000010ff94a53 RCTJSErrorFromNSError + 275",
"2 TestApp 0x000000010ff25058 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.187 + 152",
"3 TestApp 0x000000010fe93c8d -[GenericShare shareSingle:failureCallback:successCallback:serviceType:] + 2301",
"4 TestApp 0x000000010fe91f75 -[RNShare shareSingle:failureCallback:successCallback:] + 373",
"5 CoreFoundation 0x0000000119118ccc __invoking___ + 140",
"6 CoreFoundation 0x0000000119118b84 -[NSInvocation invoke] + 308",
"7 CoreFoundation 0x00000001191318d6 -[NSInvocation invokeWithTarget:] + 54",
"8 Battledore 0x000000010ff2803c -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2796",
"9 TestApp 0x000000010ffdc012 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 786",
"10 TestApp 0x000000010ffdbb3f _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 127",
"11 TestApp 0x000000010ffdbab9 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 25",
"12 libdispatch.dylib 0x0000000119f3773b _dispatch_call_block_and_release + 12",
"13 libdispatch.dylib 0x0000000119f38779 _dispatch_client_callout + 8",
"14 libdispatch.dylib 0x0000000119f42778 _dispatch_main_queue_callback_4CF + 1279",
"15 CoreFoundation 0x0000000119157c99 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9",
"16 CoreFoundation 0x000000011911bea6 __CFRunLoopRun + 2342",
"17 CoreFoundation 0x000000011911b30b CFRunLoopRunSpecific + 635",
"18 GraphicsServices 0x000000011cf3ea73 GSEventRunModal + 62",
"19 UIKit 0x0000000114f6f0b7 UIApplicationMain + 159",
"20 TestApp 0x000000010fe9195f main + 111",
"21 libdyld.dylib 0x0000000113b5a955 start + 1",
],
"userInfo": Object {
"NSLocalizedFailureReason": "Not installed",
},
},
}
When i share it through whatsapp on ios, it takes me to the apple store and on pressing back to return to my app i get an error.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:48 (6 by maintainers)
Top Results From Across the Web
react-native-share promise rejection error - Stack Overflow
I think you need to add RNShare.xcodeproj to your Project' Libraries and then go to General->Linked Frameworks and Libraries, ...
Read more >Share.shareSingle | React Native Share - GitHub Pages
This shared message may contain text, one or more files, or both. Open the share dialog with the specific application. This returns a...
Read more >[Solved]-react-native-share promise rejection error-Reactjs
Coding example for the question react-native-share promise rejection ... could not get Share.open() to work, but I did manage to get Share.share() to...
Read more >[Unhandled promise rejection: SyntaxError: Unexpected token ...
Error : Requiring module "node_modules/react-native-reanimated/src/Animated.js", which threw an exception: Error: Reanimated 2 failed to create a worklet, maybe ...
Read more >HELP!!! My Async Await with Try Catch return Unhandled ...
I keep coming across "Unhandled Promise Rejection" when I try to combine ... throw err } } return check }) } showOtherResponse() {...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve same issue on iOS Simulator. It’s should be fixed like this:
@smaelbarry I’m on the same RN version (0.63.4). this is my current info.plist please check if you have followed all the steps in https://react-native-share.github.io/react-native-share/docs/install