Conditional inclusion
Hi all,
My XML files are getting real slow to process on the iphone.
I've altered my code so an xml read outputs a binary; which I can then load and is of course much faster.
Problem is I don't want the XML included in my build. At the moment I have both the xml and binary.
I guess really the xml is read and used in debug mode and the binary is read and used in release build. But how do I set it so only the appropriate file is included in the relevant build rather than just both?
thanks in advance.
My XML files are getting real slow to process on the iphone.
I've altered my code so an xml read outputs a binary; which I can then load and is of course much faster.
Problem is I don't want the XML included in my build. At the moment I have both the xml and binary.
I guess really the xml is read and used in debug mode and the binary is read and used in release build. But how do I set it so only the appropriate file is included in the relevant build rather than just both?
thanks in advance.
Instead of using a copy phase in your application's target, you can use a script to copy the files. The script can check the build configuration and do the appropriate thing. You'll have to look up how XCode names the shell variables though, I haven't touched that in a while.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Hey Scott,
That sounds like a plan!. Would of thought Xcode would have some facility for this built-in you know like a tick box for "include in DEBUG or include in RELEASE". Will check it out.
thanks as always.
Cheers
That sounds like a plan!. Would of thought Xcode would have some facility for this built-in you know like a tick box for "include in DEBUG or include in RELEASE". Will check it out.
thanks as always.
Cheers

