IOS Files App Folder
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
IOS Files App Folder
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
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
-
- VIP Livecode Opensource Backer
- Posts: 76
- Joined: Tue Mar 05, 2013 7:00 pm
- Location: Berlin
- Contact:
Re: IOS Files App Folder
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
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
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
Thanks anyway
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
-
- VIP Livecode Opensource Backer
- Posts: 76
- Joined: Tue Mar 05, 2013 7:00 pm
- Location: Berlin
- Contact:
Re: IOS Files App Folder
Have you tried to name your file something like testfile.txt?
Re: IOS Files App Folder
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.
-
- VIP Livecode Opensource Backer
- Posts: 76
- Joined: Tue Mar 05, 2013 7:00 pm
- Location: Berlin
- Contact:
Re: IOS Files App Folder
Your file should have a file extension!
Like .txt or .xml or .csv at the end of the filename
Like .txt or .xml or .csv at the end of the filename
Re: IOS Files App Folder
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
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
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
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!
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!