Wed, 14 Jul 2021 08:20:54 GMT
Join the conversation at slack.cordova.io
Tue, 13 Jul 2021 11:54:48 GMT
@norman137 says
iOS by default is pretty locked down. Sharing the file to other apps like the File Manager is different than storing that file on a server.
The typical way of sending a file to a server is through an HTTP request that uploads the server, which the server then saves the file in a persistent location (such as database, filesystem or CDN, etc...). This can be done by reading the file using
cordova-plugin-file
plugin and then making a http request with a traditional JSXMLHttpRequest
class.If you want to share the file with other iOS apps, then natively that‘s usually done with the
UIActivityViewController
[1], I’m not aware of any cordova plugins that interfaces with that native object to share files, but there is one that most likely exists. I found this one in a quick google search: https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin which still appears to be maintained. (Screenshots are obv old, but had updates to support AndroidX a few months ago so...){1] https://developer.apple.com/documentation/uikit/uiactivityviewcontroller?language=objc
Tue, 13 Jul 2021 12:38:39 GMT
@info.vishalgohil says
Thanks @norman137 for the reply, here is video of my requirement, it sharing single image from
Photos
to myIONIC
app. This same I have to implement for multiple image, PDF and ZIP
Tue, 13 Jul 2021 12:40:18 GMT
@info.vishalgohil says
I checked on google, there is no any plugin for IOS IONIC-5, The plugin is available for IONIC-1 so I modified the plugin and it working for single image only.
Tue, 13 Jul 2021 12:40:43 GMT
@info.vishalgohil says
I try to manage that plugin for multiple image and PDF, ZIP but no luck.
Tue, 13 Jul 2021 13:29:10 GMT
@norman137 says
Sorry, I don‘t really know how to use
UIActivityViewController
so I can’t really provide much more input. I just know natively that's how you share files. Based on naming schemes, it sounds like it supports handling more than 1 file at the same time, but not sure how to make it happen.