Copy Files in Standalone settings
Posted: Sun Jun 16, 2019 2:51 am
I have an issue that I'm pretty sure is caused by an external file not being loaded when I save as a Standalone Application.
I have a text file located on my MacBook Air running Mac OS 10.14.5 in the Documents folder.
In the Copy Files box in the Standalone Settings, I select this file to be copied in the build.
Everything works swimmingly on the mac but when I load it onto my iPhone 8+ iOS 12.3.2 the text file is either not accessible or not there.
I put a statement in the file to show the number of lines in the file:
set the defaultFolder to (specialFolderPath("documents") & slash)
put URL("file:" & (specialFolderPath(documents") & "/Script.txt")) into tfile
Put the number of lines of tfile into howmany
answer howmany
On the Mac I get the answer 366
On the iPhone the answer is 0
I think this is the first app I have written that needed a file that I needed to copy when building the app.
Is something wrong with the way I am copying the file to the iPhone?
Thanks
Tom
I have a text file located on my MacBook Air running Mac OS 10.14.5 in the Documents folder.
In the Copy Files box in the Standalone Settings, I select this file to be copied in the build.
Everything works swimmingly on the mac but when I load it onto my iPhone 8+ iOS 12.3.2 the text file is either not accessible or not there.
I put a statement in the file to show the number of lines in the file:
set the defaultFolder to (specialFolderPath("documents") & slash)
put URL("file:" & (specialFolderPath(documents") & "/Script.txt")) into tfile
Put the number of lines of tfile into howmany
answer howmany
On the Mac I get the answer 366
On the iPhone the answer is 0
I think this is the first app I have written that needed a file that I needed to copy when building the app.
Is something wrong with the way I am copying the file to the iPhone?
Thanks
Tom