Friday, May 14, 2010

How To Read a File From Your Application Bundle

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"MyFile" ofType:@"txt"];
NSData *myData = [NSData dataWithContentsOfFile:filePath];
if (myData) {
// do something useful
}

No comments:

Post a Comment