Page 1 of 1

mergPopActivity for iOS - can't make it work

Posted: Fri Oct 30, 2020 10:38 pm
by livfoss
I have an iOS app that generates a text file (actually it's a .gpx file, which is a text in XML format). I want to allow the user to share the file in the usual ways (copy, mail, etc).

I create a file and put it into my "documents" folder within the app and store the path to it in a local variable, tPath. The file's name is stored in tFileName. Then at the appropriate time, the app executes:

mergPopActivity tFileName,,url ("file:" & tpath)

Although Elanor at LiveCode suggested the above, I can't make it work. The modal window opens, but what it seems to want to share is just the file name, not the file itself. Of course I could put the entire text file into the first parameter, but then it wouldn't be a file, just a text string, so that can't be right, and the file wouldn't have a name. I have also tried the following, also unsuccessfully:

mergPopActivity tFileName,,url ("binfile:" & tpath)

I guess I have got the format wrong, but the documentation (LC Dictionary) doesn't give sufficiently precise instructions. I believe Elanor is working on a lesson that will clarify this, but meanwhile what did I do wrong? Hoping someone can help.