title: is saving in NSDocumentDirectory okay?
body: <p>My app is using the <code>NSDocumentDirectory</code> to save images in it, I just wanna ask if its the safe way to save images(100 maximum). I have read several thread &amp; questions with answers about it, though I dont know which to follow.Some say that its okay to save there. Some say I shouldnt use <code>NSDocumentDirectory</code> for saving, because it will be back-up by the <code>iCloud</code>. So where can I save it that when the user exit the app then run the app again, then images should still be there?. I dont know much about the <code>tmp</code> directory or <code>cache</code> directory. But if its either one of the 2 that I should use, How can I use them in my code here:</p>
  
  <pre><code>                NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory,    NSUserDomainMask ,YES );
                  NSString *documentsDir = [paths objectAtIndex:0];
                  NSString *savedImagePath = [documentsDir stringByAppendingPathComponent:[NSString stringWithFormat:@"Images%d.png", i]];
                  ALAssetRepresentation *rep = [[info objectAtIndex: i] defaultRepresentation];
                  UIImage *image = [UIImage imageWithCGImage:[rep fullResolutionImage]];
                  //----resize the images
                  image = [self imageByScalingAndCroppingForSize:image toSize:CGSizeMake(256,256*image.size.height/image.size.width)];
  
                  NSData *imageData = UIImagePNGRepresentation(image);
                  [imageData writeToFile:savedImagePath atomically:YES];
  </code></pre>
  
  <p>Thank you so much for the help.</p>