This isn't a language level question, it's a platform packaging level question. On both Mac OS X and iOS, typically you'll add the resource file to your project, then get the path to the file from NSBundle
:
NSString *path = [[NSBundle mainBundle] pathForResource:@"file" ofType:@"xml"];
Libraries in Objective-C are called frameworks. Like applications, they are also bundles on Mac OS X and instead of mainBundle
you probably want to use bundleForClass:
.
iOS does not support frameworks, only static libraries, so you won't be able to include your resource files with your library on that platform. They must be added directly to the project.