Page 1 of 1
IOS Files App Folder
Posted: Tue Jun 23, 2020 10:12 am
by Batninja
Hi all.
I'd like to try and get a custom folder in the IOS iPhone Files app to expose documents created by my app. I know that LiveCode mobile saves to a sandbox documents folder but how can I get that folder (or a different new one) to show up in the Files app?
In Files I can see folders for Excel, LoppyHD, Adobe Scan etc. and individual files like audio recordings. I'd like a folder with the name of my app so that I can 1. edit a JSON file with a nice interface, 2. allow a user to copy it into an external disk drive
Any suggestions or comments welcomed, thanks.
Roger
Re: IOS Files App Folder
Posted: Sun Sep 27, 2020 12:47 pm
by mimu
did you try to flag the "File Sharing" in the "Standalone Application Settings" for iOS?
afterwards you should have the
<key> UIFileSharingEnabled</key>
<true/>
inside the info.plist inside your app bundle.
some useful hints:
http://forums.livecode.com/viewtopic.php?t=12162
http://lessons.livecode.com/m/4069/l/10 ... lc-ios-app
Re: IOS Files App Folder
Posted: Sun Sep 27, 2020 6:59 pm
by Batninja
Many thanks for the suggestion, sadly I could not get it to work.
I enabled the File Sharing check box in a test app in the IOS
Standalone Settings - Requirements screen but despite working in Run mode on my Mac and making a folder then writing to it I had no luck with a Simulator or iPhone 6 or iPad Air 2.
This is the code I used in a button
Code: Select all
on mouseUp pButtonNumber
set the defaultFolder to specialFolderPath("documents")
create folder "Rogy" #does nothing if folder exists
put "hello" into URL("file:Rogy/testfile")
end mouseUp
Thanks anyway
Re: IOS Files App Folder
Posted: Sat Oct 03, 2020 7:45 am
by mimu
Have you tried to name your file something like testfile.txt?
Re: IOS Files App Folder
Posted: Sun Oct 04, 2020 7:54 pm
by Batninja
Thanks for the suggestion, I did try just writing a plain text file and it will save and retrieve but again nothing in the Files area on the iPhone.
Re: IOS Files App Folder
Posted: Sun Oct 04, 2020 9:05 pm
by mimu
Your file should have a file extension!
Like .txt or .xml or .csv at the end of the filename
Re: IOS Files App Folder
Posted: Mon Oct 05, 2020 8:27 am
by Batninja
Yes thanks it did, have you managed to get it work and be accessed from the Files app on IOS 14?
Re: IOS Files App Folder
Posted: Thu Oct 22, 2020 10:26 am
by denilvega
According to me Files app isn’t about giving the iPhone and iPad a local file system. It’s about making it easier for people to work with files and move them between apps, especially on the iPad.
Re: IOS Files App Folder
Posted: Thu Oct 22, 2020 11:55 am
by Batninja
Yes

, you can plug a USB stick into the IOS device and access/copy files across into the Files app. Its those I would like to read and write to, i.e. not just locally to the LiveCode app itself.
Re: IOS Files App Folder
Posted: Fri Oct 23, 2020 11:06 am
by Batninja
I think I'm making some headway with this
I can use MergDoc to export out from the "documents" folder to the Files app. Presumably, I can then use custom info.plist (lesson
http://lessons.livecode.com/m/4069/l/10 ... lc-ios-app) so that in the Files app I can "open in" my LiveCode app.
What I'm trying to do is be able to plug an OP-Z synth into an iPhone (which then appears as a drive in the Files app) and use a Livecode app to edit the JSON config files with radio buttons rather than having to edit manually using a text editor).
So 1. Connect OP-Z to iPhone, open drive in Files and open JSON doc in LiveCode app.
then 2. Edit JSON doc in Livecode app and save back out to Files choosing OP-Z drive.
simples!
