LC iOS Command 'mergPopActivity' [was Re: The iOS "Files" folder]
livfoss at mac.com
Sun Oct 18 06:58:50 EDT 2020
I have been trying to use this command, initially to allow an iOS app to put something in the “Files” folder on an iPhone, but I’m now more interested in the whole idea of Activity Views and how to exploit them in an iOS app. I believe that the LC ‘mergPopActivity' command is a wrapper for some function in the iOS native universe - connected with ‘UIActivityViewController', but so far I haven’t worked out which one, since I don’t really understand much of Apple’s iOS Developer documentation (I always hope that using LC removes the need to do so!).
Elanor Buchanan of the mother ship has been extremely helpful about this, and has said she hopes to improve the almost non-existent documentation of this command, but meanwhile I’m interested if anyone on this list has any insights, as I’m quite stuck and don’t want to bug Elanor too much.
When you invoke the ‘mergPopActivity' command in an LC script, it opens a modal window which gives a gateway into services available on your device, like email, printing, saving to “Files”, sending to social media etc - it depends on what your device is capable of, and the apps it has loaded; so I believe that the LC command essentially implements the ‘sharing’ activity in iOS, which is usually invoked via an icon consisting of a square with a North-pointing arrow in it.
So far so good, but I’ve only been able to do one thing so far, which is to offer a text string originating in the app to these various services. So far I have not been able to find a way to offer a file (for example, a file containing a text rather than the text itself - easy to generate within an app, but no luck in offering to email it etc). There is a ‘URL’ parameter but I can’t work out what it does.
Anyone got any clues or shall I apologise (again) to Elanor and ask her for more help?
More information about the use-livecode