Take out the plist File Processing Section used in the project directly:
// Write data such as data-(void) writeToSendedList :( NSString *) message {// NSArray * storeFilePath = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES) in the sandbox ); NSString * doucumentsDirectiory = [storeFilePath objectAtIndex: 0. plist "]; if ([[NSFileManager defaultManager] fileExistsAtPath: [doucumentsdireory ory stringByAppendingPathComponent: @" MessageList. plist "] = NO) {// ================================ write plist initialization data ==== ============================== NSMutableDictionary * messageList = [[NSMutableDictionary alloc] init]; NSMutableDictionary * sendedList = [[NSMutableDictionary alloc] init]; NSMutableArray * hztest01Sended = [[NSMutableArray alloc] Destination: @ "123", @ "12222", @ "fox ", nil]; [sendedList setObject: hztest01Sended forKey: @ "hztest01"]; optional * draftsList = [[using alloc] init]; NSMutableArray * hztest01Drafts = [[NSMutableArray alloc] failed: @ "123", @ "12222", @ "fox", nil]; [draftsList setObject: hztest01Drafts forKey: @ "hztest01"]; [messageList setObject: sendedList forKey: @ "DraftsList"]; [messageList writeToFile: plistPath atomically: YES];} // non-sandbox directory // NSString * plistPath = [[NSBundle mainBundle] pathForResource: @ "SendedList" ofType: @ "plist"]; optional * dictionary = [[NSMutableDictionary alloc] identifier: plistPath]; optional * mydictionary = [[NSMutableDictionary alloc] initWithDictionary: [dictionary objectForKey: @ "SendedList"]; NSMutableArray * mysendedList = [[NSMutableArray alloc] initWithArray: [mydictionary objectForKey: @ "hztest01"]; NSLog (@ "hztest01 sending box: % @", mysendedList); [mysendedList addObject: message]; [mydictionary removeObjectForKey: @ "hztest01"]; [mydictionary setObject: mysendedlforkey: @ "hztest01"]; [dictionary setObject: mydictionary forKey: @ "SendedList"]; [dictionary writeToFile: plistPath atomically: YES]; [mysendedList release]; [mydictionary release]; [dictionary release];}