views:

354

answers:

2

I'd like to include files, data and images in a static library API so the users won't need to include them manually in their project. I see that there isn't obvious way to do it but is there some hack or workaround to achieve this goal ? Thanks

A: 

So after referencing the frameworks programming guide, @codeflakes pointed out that dynamic frameworks aren't possible on iPhone OS. I found this link which looks like it has a static lib that includes a few resources. I downloaded the PlausibleDatabase lib referenced there and did see a couple items in a Resources directory. I think the static lib has to build it's own pseudo-bundle structure to get at those things.

wkw
But I though you could not write your own Framework on the iPhone ?
CodeFlakes
Thanks for the link
CodeFlakes
+1  A: 

You can try to use xxd with the -i command line parameter and use a wrapper function/method that feeds the data into a NSData

- (UIImage*)getMyImage
{
    return [UIImage imageWithData:[NSData dataWithBytes:file_ext 
                                                 length:file_ext_len]];
}
epatel
Nice trick! thank you
CodeFlakes