react-native-share: iOS 13 New UI close button doesn't reject promise

Steps to reproduce

On iOS 13 we have issue with new close button: If user clicks on new iOS 13 UI close button - .catch() callback doesn’t fire, so Promise is not rejected in this case. On iOS 12 with previous UI Cancel button it works correctly

Expected behaviour

catch callback should be called, promise should be rejected.

Actual behaviour

catch callback is not called, promise is not rejected.

Environment

  • React Native version: 0.61.2
  • React Native platform + platform version: iOS 13.0

react-native-share

Version: 2.0.0"

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 23 (4 by maintainers)

Most upvoted comments

@jgcmarins I’ll open a PR for the promise not resolving when the sharesheet is dismissed by the user. After that a new release needs to be made, #584 and #586 both fixed crashes on iOS 13 but haven’t made it into a new release.

@esutton No problem. Just a tip - you can simplify your version string to:

    "react-native-share": "react-native-community/react-native-share#d88e542",

@tomtargosz Same for me, issue fixed, please publish new release. Thanks

@Simek I’m just a contributor so I don’t have the permissions to create a release. @oleksandr-dziuban can you confirm that your issues are now resolved with the fixes merged into master? After that @jgcmarins should be good to make a new release 👍

Easy to reproduce on iOS 13:

  1. On share dialolg, select Messages like you are about to SMS text PDF
  2. Press Cancel (or Send)
2019-11-06 12:37:09.327 [fatal][tid:main] Illegal callback invocation from native module. This callback type only permits a single invocation from native code.
2019-11-06 12:37:09.327451-0600 MyApp[14029:3724994] Illegal callback invocation from native module. This callback type only permits a single invocation from native code.

Using:

    "react": "^16.9.0",
    "react-native": "0.60.6",
    "react-native-share": "^2.0.0",

Master fixed it at d88e542ddd0983d09a4aa1a82737bb05b5731801

    "react-native-share": "https://github.com/react-native-community/react-native-share#d88e542ddd0983d09a4aa1a82737bb05b5731801",

We plan to release a new version as soon as possible. Could you use master branch to check if everything is fine?