HI can u send me sample code to add the data to the .plist. .my plist was in this format as follows.kindly help me out
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>http://localhost:8888/sample</string>
<string>http://localhost:8888/sample</string>
</array>
</plist>
i wil send the url string from the implementation code.kindly help me in this pls..
-(IBAction)AddFieldid)sender;
{
NSMutableArray *myPrimaryinfo = [[NSMutableArray arrayWithCapacity:6]retain];
NSArray *keys = [NSArray arrayWithObjects:@"string",nil];
[myPrimaryinfo addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:
[NSString stringWithFormat:@"sample"],nil]forKeys:keys]];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDire ctory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *path = [documentsDirectory stringByAppendingPathComponent:@"urls.plist"];
[myPrimaryinfo writeToFile:path atomically:NO];
NSLog(@"PrimaryInfo array: %@", myPrimaryinfo);
}
Thanks