こんにちは、下の画像のように **次の形式で plist にデータを追加する必要があります**
しかし、実際のiam取得は次のようなものです
これのための私のコードを助けてください..
-(void)updatePlist
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *pathOfPricePlist= [[paths objectAtIndex:0] stringByAppendingPathComponent:@"Price.plist"];
NSMutableDictionary *mutableDictionary=[[NSMutableDictionary alloc]init];
NSMutableArray *finalList=[[NSMutableArray alloc]init];
for(int i=0;i<[sharedManager.bookidList count];i++) {
[mutableDictionary setValue:[sharedManager.sharedProductPrice objectAtIndex:i] forKey:@"price"];
[mutableDictionary setValue:[sharedManager.bookidList objectAtIndex:i] forKey:@"booknumber"];
NSLog(@"%@",mutableDictionary);
[finalList addObject:mutableDictionary];
NSLog(@"%@",finalList);
}
[finalList writeToFile:pathOfPricePlist atomically:YES];
}