Reputation: 10509
Our development team is planning a product, and we need to figure out if it's possible to remove photos from Photos library on iOS via our application code. We are basically doing a backup and clean application. Please let me know if this is possible via API's provided by Apple.
Upvotes: 1
Views: 528
Reputation: 23882
You can do it via Photos.Framework , but it's only available later versions iOS 8.
Sample code is available at developer's library.
// Delete asset from library
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
[PHAssetChangeRequest deleteAssets:@[self.asset]];
} completionHandler:completionHandler];
Upvotes: 2
Reputation: 9143
It's possible using the Photos framework.
Look into PHAssetChangeRequest
and the deleteAssets:
method.
Upvotes: 1