NSString stringWithContentsOfFile failing with what seems to be the wrong error code

后端 未结 6 1853
闹比i
闹比i 2021-02-12 22:33

I\'m trying to load a file into a string. Here is the code I\'m using:

NSError *error = nil;
NSString *fullPath = [[NSBundle mainBundle] pathForResource:filename         


        
6条回答
  •  鱼传尺愫
    2021-02-12 22:42

    I had the same error with you ,use file name with [[NSBundle mainBundle] pathForResource:@"pageList" ofType:@"txt"]] good luck!

提交回复
热议问题