Livecode 5.5.5 "Copy files" not copying in simulator

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
colourpixels
Posts: 83
Joined: Mon Oct 31, 2011 5:28 am

Livecode 5.5.5 "Copy files" not copying in simulator

Post by colourpixels » Sat Jul 13, 2013 11:08 am

Hi Al,
Anyone else run into the fact that the "Copy files" selection panel in the Standalone application settings won't copy the files across in Livecode 5.5.5 and Xcode 4.6.3? If I create an application the files do indeed get copied across, but not when I run in the simulator? (looking inside the package contents for both). Any thoughts on how to get the sim version to copy the files across? A permission thing perhaps?

I guess the real answer is to use a newer version of LC, but until mobgui gets to the same place it was before I'm kinda stuck.

At least the App version is copying files across and I can manually copy the files into the simulator version manually and life is good...so my glass is half full at least. ;)

Thanks for any thoughts

Cheers
Dale

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: Livecode 5.5.5 "Copy files" not copying in simulator

Post by gpb01 » Sat Jul 13, 2013 11:16 am

You have to read the Livecode iOS release notes (page16) :


Fast simulator deployment
"Building for the iOS simulator is now substantially faster for large projects.
Any resources listed in Copy Files are no longer copied into the app-bundle. Instead, the iOS simulator engine is able to automatically and transparently use any assets specified directly from their original locations on the host machine.
In particular, from the point of view of the simulated app, any included files and folders appear as if they are, in fact, part of the application bundle – just as they would do if they had been explicitly copied.
Note: One side-effect of this is that changes to any assets while an app is running in the simulator may have an impact on it; just as it would in the IDE.
Note: This feature is currently only supported when running in the simulators for iOS 4.0 and later. When running in the 3.2 or 3.1.3 simulators, the old (slow) method of copying files will still used."


Guglielmo

colourpixels
Posts: 83
Joined: Mon Oct 31, 2011 5:28 am

Re: Livecode 5.5.5 "Copy files" not copying in simulator

Post by colourpixels » Sat Jul 13, 2013 11:23 am

no I didn't spot that, thank you greatly for the heads up. The problem is that code like:
mergDocShowPreview specialFolderPath("engine")&"/files/help.pdf"

doesn't seem to work in the new simulator, just sits there spinning its wheels. If I manually copy the file into the simulator folder then it works, otherwise no go. Any suggestion?

Thanks again.

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: Livecode 5.5.5 "Copy files" not copying in simulator

Post by gpb01 » Sat Jul 13, 2013 12:47 pm

Mmm ... try

Code: Select all

mergDocShowPreview (specialFolderPath("engine") & "/files/help.pdf")
with the parenthesis ... I had a very similar problem with the Livecode statement :

Code: Select all

put specialFolderPath("engine") into gEnginePath
if there is a file (gEnginePath & slash & "borgolink.htm") then
which doesn't work without the parenthesis. Maybe ... is the same problem ... ;)

Guglielmo

colourpixels
Posts: 83
Joined: Mon Oct 31, 2011 5:28 am

Re: Livecode 5.5.5 "Copy files" not copying in simulator

Post by colourpixels » Sat Jul 13, 2013 12:56 pm

worst luck the parenthesis didn't help. Thanks for the suggestion though. I wonder if it's anything to do with it being an external, perhaps externals don't see the new "virtually mapped" files in the simulator??

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: Livecode 5.5.5 "Copy files" not copying in simulator

Post by gpb01 » Sat Jul 13, 2013 1:13 pm

Yes, probably the external, which is C/C++ code, compiled with Xcode ... doesn't know anything about the "virtually mapped" Livecode files ... :(

Guglielmo

trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: Livecode 5.5.5 "Copy files" not copying in simulator

Post by trevix » Sat Aug 27, 2016 12:39 pm

I have a similar problem. (LC7.1.4, OSX10.10.5,Simulator 9.2, iPad 9.2)
My app load a folder "serve" that contains a bunch of videos ( in Standalone application setting/copy files) that on PreopenStack get copied to specialfolderpath("documents") on iOS

Code: Select all

repeat...
put URL ("binfile:/" & specialfolderpath("engine") & "/Serve/"  & tLine)  into URL ("binfile:/" & specialFolderPath("Documents") & "/" & tLine)
...
end repeat
If the App is not in the simulator (or iPAd) everything works fine and my videos end up on the specialFolderPath("Documents")

If the App has already been installed (on simulator or iPad) and I Test it again or rebuild for the iPad, the "from" folder (specialfolderpath("engine") & "/Serve/") is empty.
Actually not really empty:
Default-568h@2x.png
info.plist
NameOfTheApp
Pkginfo

Is it because on second run the "copy files" don't do it? And how can I reinstall the videos?
Thanks
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: Livecode 5.5.5 "Copy files" not copying in simulator

Post by trevix » Tue Aug 30, 2016 10:07 am

Solved:
the path to the specialfolderpath("documents") changes slightly at each reinstall of the App(simulator and iPad).
I was saving it in my preferences...
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

Post Reply