Quantcast
Viewing all articles
Browse latest Browse all 794

iOS Deployment • Re: adding a folder to the documents folder

Hi Jean-Marc,

You have to find a way to copy your resources from engine folder to the documents -or any other read/write capable- folder.
This is your responsibility as a developer.
Using some conditional statements and loops, you can handle this easily.
I've attached a stack just to demonstrate an example.
Beware that it's only an example, though it served me well for months.
But it's not optimized and it's good merely for my needs.
You have to customize it.
Or better, you should write your own code tailored for your needs.

copyInstallationDemo.zip


A little help to understand what the stack does:
Put all of your resources into one folder named as theContent.
Copy it to the engine folder via LiveCode's Copy Pane.
The stack script iterates and enumerates through that folder and copy everything to the documents folder.
You can check later the job in the simulator's local folder ~/Library/Application Support/iPhone Simulator/.

I want to warn one more time, it's far from being optimized and there isn't any explanatory comments,
I actually don't have time for these tasks or maybe I'm too lazy Image may be NSFW.
Clik here to view.
:oops:


Hope it helps Image may be NSFW.
Clik here to view.
8)



Best,

~ Ender Nafi
Hello Ender Nafi and thanks for your demo stack.
I played with your demo stack "copyInstallationDemo.zip" (adapting it also for OSX Sonoma, LC10 ide) and is working nicely.
But I found something very odd:

In order to implement some error checking, after having done a new "copyInstallation" in OSx, I "locked" on the Finder one of the text file inside the folder (on the target).
From then on, I wasn't able anymore to delete the folder containing the file.
Not manually removing the lock from the file
Not manually deleting the file.
What is even more strange, deleting manually the entire "theContent" folder, restarting the Mac, doing a new install, doing an update, The "clearOldInstallation" command was not able anymore to delete the "folder1" wich once contained the locked file.
We know that a folder cannot be delete if there are files inside, so I even checked the existence of some hidden ".xxx" file (none).

Anybody can explain me this?
Thanks

Statistics: Posted by trevix — Thu Sep 26, 2024 6:09 pm



Viewing all articles
Browse latest Browse all 794

Trending Articles