Saving an animated gif from AppData to photo album - iOS 11 -


how save gif documents or appdata folder (or otherwise known path) photo album ios 11?

example of known path: /var/mobile/containers/data/application/[app uuid]/documents/filename.gif

older versions of question keep referencing deprecated ala*. how do ios 11?

add frameworks foundation , photos

  #import <foundation/foundation.h> #import <photos/photos.h>  int savegiftogallery(const char *path0){      nsstring *path = [nsstring stringwithutf8string:path0];     nsdata *data = [nsdata datawithcontentsoffile:path];     [[phphotolibrary sharedphotolibrary] performchanges:^{         phassetresourcecreationoptions *options = [[phassetresourcecreationoptions alloc] init];         [[phassetcreationrequest creationrequestforasset] addresourcewithtype:phassetresourcetypephoto data:data options:options];     } completionhandler:^(bool success, nserror * _nullable error) {         nslog(@":%d",success);     }];      return 1;  } 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -