0

I am not sure if i missed the URL in the internet. I am trying to copy or move the file [jpeg file] from Document folder to PhotoGallery in iOS. Is there any api available in iOS?

also,

Is there any way to set the notification handler for Document folder, where when the file is created in the document folder,my callback should get triggerd where i will move the file from document folder to Photo Gallery.

Matthias Bauch
  • 89,811
  • 20
  • 225
  • 247
Whoami
  • 13,930
  • 19
  • 84
  • 140
  • after creation complete which api you are using for saving file in document directory?that will tell you that file storing is completed. – johny kumar Dec 15 '14 at 13:10
  • Johny kumar, The File saving operation is asynchronous, in other way the other library saves, and we have no way to figure out polling the directory. – Whoami Dec 15 '14 at 13:34

1 Answers1

1

You can do it with this:

UIImageWriteToSavedPhotosAlbum (image, self, @selector(image:didFinishSavingWithError:contextInfo:) , nil);

the callback method signature is:

- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo

Later edit

If you want to get notified for file changes you can find some answers here: Notification of changes to the iPhone's /Documents directory

Community
  • 1
  • 1
user623396
  • 1,537
  • 1
  • 17
  • 39