hello,
i'm new to iPhone programming and coding in XCode SDK.I want to access and read the configuration file which i have placed in Resource folder in XCode,my configuration file looks like this
@key=value$
@vinu=flower$
@cathy=fruit$
I want to compare the key and access the value from configuration file. Since i'm working with iPhone OS, i cant use NSWorkspace.Hence i'm using NSFileHandle. This is how my code looks like,
NSString *path = [[NSBundle mainBundle] pathForResource:@"configuration" ofType:@"txt"];
NSFileHandle *readHandle = [NSFileHandle fileHandleForReadingAtPath:path];
NSString *txtString = [[NSString alloc] initWithData:
[readHandle readDataToEndOfFile] encoding:NSUTF8StringEncoding];
please let me know is the procedure correct, and how to proceed. ??
Thank You.