EternallLight / cordova-plugin-openwith-ios

A modified version of the Cordova iOS Share extension (cordova-plugin-openwith) by Jean-Christophe Hoelt for iOS. Supports receiving shared URLs, text and images as well as sharing several images at once.
https://web-mystery.com/
MIT License
28 stars 84 forks source link

[IOS] App failed to launch when sharing screenshot #28

Closed PocoMin closed 3 years ago

PocoMin commented 3 years ago

After taking a screenshot, iphone shows a window for screenshot image and there is a share option. Sharing image from the screenshot window does not launch the app. To reproduce the issue:

  1. Take a screenshot on IOS phone.
  2. Click on screenshot thumbnail on the bottom left corner of the screen.
  3. Share to app. Nothing happened, no respond from app.

Error from phone log:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[NSURL URLByAppendingPathComponent:]: component, components, or pathExtension cannot be nil.'

Seems like the share extension had an unhandled exception and was terminated.

Note that saving the screenshot into photo library and share from photo library does not have any issue.

PocoMin commented 3 years ago

The issue is somehow gone after I remove the ios platform and reinstall the plugin. My guess was when removing the plugin some of the plugin classes were not removed from the platform, which makes reinstall without removing the platform not overwriting the classes.