Saving Changes in iOS - Solved

Roger Guay irog at
Thu Feb 1 01:10:05 EST 2018

Thanks to Ralph and Klaus, I’ve succeeded in building my first iOS app that saves user data. The following post form Klaus did it.

> Please read up the specialfolderpath() section in the dictionary.
> 1. specialfolderpath("documents”) is the folder inside of the application bundle where we have write permissions!
> It is already there, do NOT try to create it!
> 2. Add your "main" stack via the "Copy files" to your app.
> 3. Then do this when the app (launcher) starts (preopenstack or openstack)
> ...
> ## Stack in users docs folder, where we have write permissions, means where we can SAVE that stack:
> put specialfolderpath("documents") & "/your mainstack here.livecode" into tTargetStack
> ## This is the stack you added via "Copy files":
> put specialfolderpath("resources") & "/your mainstack here.livecode" into tSourceStack
> ## check if the app had already been opened before:
> if there is NOT a file tTargetStack then
>  put url("binfile:" & tSourceStack) into url("binfile:" & tTargetStack)
> end if
> ## Now open that new stack in the users docs folder and save it later without problems:
> go stack tTargetStack
> ...
> And don't forget to add:
> ...
> start using this stack…

This should be a tutorial somewhere.

Thanks again guys. Especially for being patient with me!!


More information about the Use-livecode mailing list