-2
的main.m測試NSBundle爲什麼控制檯輸出(空)?
NSString* filePath = [[NSBundle mainBundle] pathForResource:@"bookinf"
ofType:@"txt"];
NSString* content = [NSString stringWithContentsOfFile:filePath
encoding:NSUTF8StringEncoding
error:nil];
NSLog(@"file content : %@" , content);
bookinf.txt內容: '<' C程序設計語言>