How to include files in an iOS-App?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to include files in an iOS-App?

J. Landman Gay via use-livecode
How can I include e.g. a textfile (let's say „MyText.txt“), when building the standalone application for iOS for the use from within the app (reading from/writing to)?
I get my apps running on my iPad, I can read and write files, and  - if there is no „TheFiles“-folder -  I can create such a folder within the „documents-folder" by the help of the special-folderpath-function.
But how can I include such a folder  („TheFiles“{holding already existing different xy.txt files}) in my iOS-application (inside the documents-folder) when building the standalone, so that I can access these textfiles from within my iOS-Applcation?
Many thanks for you advising me.
Martin


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: How to include files in an iOS-App?

J. Landman Gay via use-livecode
Martin,

1) Put the text file into the "Copy Files" pane of the standalone settings
2) When app start check is there is a copy in your "the documents folder/somepath" folder. If not then copy it from "the engine folder" to "the documents folder/somepath" folder.
3) Your app will access the file in the " the documents folder/somepath" folder and read/write at will.

"The engine folder" is where you find the files in the Copy Files pane and is read-only.
"The documents folder" is read/write.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of martin meili via use-livecode
Sent: Thursday, March 01, 2018 1:39 PM
To: [hidden email]
Cc: martin meili
Subject: How to include files in an iOS-App?

How can I include e.g. a textfile (let's say „MyText.txt“), when building the standalone application for iOS for the use from within the app (reading from/writing to)?
I get my apps running on my iPad, I can read and write files, and  - if there is no „TheFiles“-folder -  I can create such a folder within the „documents-folder" by the help of the special-folderpath-function.
But how can I include such a folder  („TheFiles“{holding already existing different xy.txt files}) in my iOS-application (inside the documents-folder) when building the standalone, so that I can access these textfiles from within my iOS-Applcation?
Many thanks for you advising me.
Martin


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to include files in an iOS-App?

J. Landman Gay via use-livecode
On 3/1/18 1:02 PM, Ralph DiMola via use-livecode wrote:
> "The engine folder" is where you find the files in the Copy Files pane and is read-only.

Apple now restricts the iOS engine folder to executable code only. You
can still use that path but LC will silently redirect to
specialFolderPath("resources") which is the real location of included
files now.

I just call the resources folder directly these days.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode