Posts

Showing posts with the label How to handle plist

Reading/Writing Plist Data

-(NSString *)PlistData {     BOOL success;     NSString *BasicURL;     NSFileManager *fileManager = [NSFileManager defaultManager];     NSError *error;     NSString *writableDBPath = [self GetDBPath];     success = [fileManager fileExistsAtPath:writableDBPath];     if (success)     {         plistData = [NSMutableDictionary dictionaryWithContentsOfFile:writableDBPath];         BasicURL=[plistData objectForKey:@"URL"];     }     else     {     // The writable database does not exist, so copy the default to the appropriate location.     NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"BasicUrl.plist"];     success = [fileManager copyItemAtPath:defau...