Closed melounek closed 4 years ago
Hi @melounek First of all, thank you for sharing this information. I believe you couldn't share files on a real devices because you had different iOS versions in deployment target option for you main app and app extension. Check out the updated instructions in the README.md file on the master branch. I tested on a real iPhone 7 device and it works now as expected. There are some issues when sharing text from Safari on a simulator but fortunately they do not show up on a real device.
Thanks for update, it works 👍 🥇
Only one more thing looks like a bug: Everytime I re-build by cordovat cordova build ios
it will rename the ShareExt target from com.my.app.shareextension
back to com.my.app
. So I have to rename it back everytime (10th step in readme)
But thanks again and feel free to close this issue.
Yep, I noticed that, too. Will take a look. Thanks for confirming.
Best regards, Andrey Grunev
On Mon, May 11, 2020 at 3:20 PM Petr Heralecký notifications@github.com wrote:
Thanks for update, it works 👍 🥇
Only one more thing looks like a bug: Everytime I re-build by cordovat cordova build ios it will rename the ShareExt target from com.my.app.shareextension back to com.my.app. So I have to rename it back everytime (10th step in readme)
But thanks again and feel free to close this issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EternallLight/cordova-plugin-openwith-ios/issues/24#issuecomment-626667214, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDSTCQLUU34NI6CY7KZPDDRQ7UR3ANCNFSM4M3KF3KQ .
It does not seem to be possible to fix this issue in the plugin directly. The cordova-ios platform correction is required – platforms/ios/cordova/lib/prepare.js. When I worked at Thirdlane, I did something like a loop over the build targets and determined which is the main app and which is extension (we had 2 app extensions besides the sharing one), and did corrections only for the main app. Unfortunately, cordova still does not support iOS app extensions out of the box. I'd really recommend you to run the application from Xcode – not only because you wouldn't face the bundle identifier override issue during cordova prepare, it is just much faster.
Thanks for checking.
I would like to use only Xcode, but when I update the javascript code, I need to get it into platforms somehow, which does cordova build
or cordova prepare
, but these are renaming the identifier.
Or if you know some better workflow how to "prepare" the updated JS, let me know.
Otherwise this should be better documented in the 10th point in the readme (the renaming or using loop-script you mentioned).
As a quick solution, you can correct your app build process and add to the last step copying the built stuff form ./www to ./platfforms/ios/www
will try, thanks
Unfortunately, cordova still does not support iOS app extensions out of the box.
Looks like the issue will be fixed soon. Now it's in cordova-ios version 6.0.0-dev
https://github.com/apache/cordova-ios/pull/820
@EternallLight good job with the release branch.
Plugin instalation ( #22 ) works correctly with the release branch.
it's not freezing anymore on the sharing-screen when I click on my app in the list, but
myHandler
func (both text or image)So basically I was never able enter
myHandler
(cordova.openwith.addHandler(myHandler)
).I tested that in my app and also in new empty cordova-app and here is my testing scenario:
hope it helps