0
我有以下代碼。 WORD.TXT是在「支持文件」:使用iPhone模擬器時找不到資源文件
NSString *filePath = [[NSBundle mainBundle] resourcePath];
filePath = [filePath stringByAppendingPathComponent:@"words.txt"];
NSData *data = [NSData dataWithContentsOfFile:filePath];
當我運行使用模擬器,數據無法正確讀取,但如果我用實際的設備,它工作正常。
什麼問題?