The code compiles. However, the warning I receive states "stringWithContentsOfFile is deprecated." I'm assuming it is not reading or finding the file properly. Any suggestions?
Here is my code:
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString* fileName = @"Pie.txt";
NSString *fileString = [NSString stringWithContentsOfFile: fileName];
//NSArray *lines = [fileString componentsSeparatedByString:@"\n"];
//NSArray *recipeDictionaries = [[NSArray alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Recipes" ofType:@"plist"]];
[pool drain];
return 0;
}
I am using XCode 4. I have not yet registered as an apple developer.
This post has been edited by jimblumberg: 23 December 2011 - 09:17 PM
Reason for edit:: Added code tags, Learn to use them.

New Topic/Question
Reply


MultiQuote






|