In the Standalone Application Settings, under CopyFiles, I copy a data file to load on start-up. In the code I set the default folder to specialFolderPath of 'home' and it works for Mac builds okay
When I build a standalone for IOS (iPad), it does not. I tried 'home', 'engine', documents' and nothing seemed to make a difference.
For IOS, where is the file copied to?
Thank you
Location of copied file?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Location of copied file?
Cyril Pruszko
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/
Re: Location of copied file?
If the file can be found when LC builds the app it should be in the engine. Show us the code you are using?
Gerry
Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Former LiveCode developer.
Now recovering.
Re: Location of copied file?
Code: Select all
set the defaultFolder to specialFolderPath("engine")
put URL ("file:" & "testClassData.CSV") into fn
put fn into field "instudents"
I tried other combinations (putting the path into the URL, etc,) This is the last iteration. I also tried 'home' and other variations.
It works under Mac but not IOS
Cyril Pruszko
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/
Re: Location of copied file?
Hi Newbie4,
hmm, some ideas:
1. the iOS filesystem is CASE sensitive, so please doublecheck the spelling of the filename
2. check for existence of that file:
3. I read about some problems with setting the defaultfolder on iOS,
so use absolute pathnames whenever possible:
Best
Klaus
hmm, some ideas:
1. the iOS filesystem is CASE sensitive, so please doublecheck the spelling of the filename
2. check for existence of that file:
Code: Select all
...
put specialfolderpath("engine") & "/testClassData.CSV" into tFile
answer (there is a file tFile)
## should give TRUE or FALSE
...
so use absolute pathnames whenever possible:
Code: Select all
...
put specialfolderpath("engine") & "/testClassData.CSV" into tFile
put url("file:" & tFile) into fld "instudents"
## check for errors reading the file. "the result" = EMPTY on success!
if the result <> empty then
answer "Error reading file:" && the result
end if
...
Klaus