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

Sharing app freeze after 2nd share (iOS 12) #12

Closed ygyg70 closed 4 years ago

ygyg70 commented 5 years ago

This started happening with iOS 12 2nd time I share Safari page I get this dialog, and when canceling the Safari is frozen and I have to kill it (see attachment) image

grexican commented 5 years ago

Ditto. Trying to dig in to figure out what's going on but I'm not an iOS dev so I don't know enough about the app lifecycle to really figure out what's going on. What it seems is that the invisible window (layer? layout? storyboard?) is blocking the rest of the app. I put on DEBUG level logging, and didn't learn anything new. Still digging to see what I can find!

grexican commented 5 years ago

I got it! Here's what you need to change:

Doing that solves the problem. You still see a brief flash of the share dialog on the second share as it's switching to your app, but that's a-ok with me for now.

grexican commented 5 years ago

Here's my PR for the fix. If you look at the diff, you'll see the changes: https://github.com/EternallLight/cordova-plugin-openwith-ios/pull/13

ygyg70 commented 5 years ago

Tried and seems to work for me :) Would be nice if someone proficient with iOS would review the change...

brandon-bt commented 5 years ago

Thank you. I was having issues with the iOS Files app freezing when I attempted to share items from there, as well. This fixed it.

grexican commented 5 years ago

PR isn't getting merged by repo owner. If you want to use my working version, you can do cordova plugin add https://github.com/grexican/cordova-plugin-openwith-ios.git to pull from mine.

FWIW I'm currently using @ygy6g70 's repository at https://github.com/ygyg70/cordova-plugin-openwith.git but I'm having trouble getting it to work with android. So I might pull back and revert to using my openwith and go back to using the Web Intent package for android.

EternallLight commented 4 years ago

@grexican thank you very much for the suggested fix! It will be included in the version 2 of the plugin