这给了我......
NSString *filename2 = [NSString stringWithFormat:@"/newFile.json"];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *getImagePath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@", filename2]];
[self.restClient loadFile:filename2 intoPath:getImagePath];
NSString *fileContent = [[NSString alloc] initWithContentsOfFile:getImagePath];
SBJsonParser *parser = [[SBJsonParser alloc] init];
NSDictionary *data = (NSDictionary *) [parser objectWithString:fileContent error:nil];
......这个错误:
加载到路径中的文件:( null)
......但为什么?这个代码在视图下加载了。文件在dropbox中,那么问题是什么