Hi all,
I have this simple method for returning the file path. I am passing the file name as argument. Then when I call this method this method returns 'null' if running on device but works fine on simulator. Is there anything I am doing wrong?
-(NSString*) getFilePathForFile:(NSString*)fileName
{
NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [array objectAtIndex:0];
NSString *temp = [documentsDirectory stringByAppendingPathComponent:fileName];
return temp;
}
NSString *path = [self getFilePathForFile:@"settingInfo.plist"]
Any help would be appreciated. Thanks