Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. NSString *appFile;
  2. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  3. NSString *documentsDirectory = [paths objectAtIndex:0];
  4. appFile = [documentsDirectory stringByAppendingPathComponent:@"myFile"];
  5. //this creates the file path
  6.  
  7.  
  8. NSDictionary* tempDict = [[NSDictionary alloc]initWithContentsOfFile:appFile];
  9. //this gets the data from storage
  10.  
  11. [tempDict writeToFile:appFile atomically:YES];
  12. //this updates the data to storage
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement