Is there a way to delete images (and videos) in camera roll in the photos app that my app didn't create. I know you can't delete things from Asset Library that your app didn't create. But this app isn't on app store. It's on a kiosk type environment. So I can use private APIs.
So is there a way to do this using private APIs that apple would not approve for the app store, but would work for my situation.
Thanks.
To delete a single image from the Photos app, open the image and tap the Delete (trash) icon at the bottom right. Then tap Delete Photo.
Are my precious photos REALLY gone? If you're using Photos (not iPhoto), "deleted" images are held for about 30 days in the Recently Deleted album. If you "permanently" deleted them from that special album, they're gone for real. If you're really still using iPhoto, they would have been moved to iPhoto Trash.
Yep, you can do this in iOS 8 using Photos framework.
For example if you have Assets URLs stored in NSArray *assetsURLs
PHPhotoLibrary *library = [PHPhotoLibrary sharedPhotoLibrary];
[library performChanges:^{
PHFetchResult *assetsToBeDeleted = [PHAsset fetchAssetsWithALAssetURLs:assetsURLs options:nil];
[PHAssetChangeRequest deleteAssets:assetsToBeDeleted];
} completionHandler:^(BOOL success, NSError *error)
{
//do something here
}];
this code will ask user to confirm removal from Camera Roll.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With