Log in or register to post comments

Use header files stored in core data (synced with a web service)

October 23, 2012 - 2:53am #1

Hi there,

I am using core data to store all my model info (there are a lot of models and the core data database will be synced with a web server). I can store the .h files as NSData and retrieve it easy enough, however how do I access the static arrays in the file? Previously I would include an "#import "SomeFile.h" " statement in my code and then be I'd able to use "someFileVerts" and "someFileNumVerts" etc to set up the model, but how do I do this when the header file is sitting in the Documents directory?

Thanks in advance.

 

Carl.

Use header files stored in core data (synced with a web service)

October 23, 2012 - 4:24am #2

Hi Carl

"I can store the .h files as NSData and retrieve it easy enough,"

This does not sound like a good idea - also bear in mind this will bloat.

"however how do I access the static arrays in the file?"

You cannot do this, as the static arrays need to be accessed / available at compile time, when you think about it.

Your best bet would be to investigate some other 3D file formats that can be easily read and compressed/decompressed.  If you hunt around you might be able to find third party libraries that can help you to do this more quickly.  

Have you thought about using Unity?  as it would provide support for many of the steps above.

HTH

N

 

Log in or register to post comments