Does the Photos access API in iPhone allow removal of photos from an application?

511 views Asked by At

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.

3

There are 3 answers

0
Ashish Kakkad On BEST ANSWER

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];
0
Ankit Sachan On

Nope it is not allowed to delete the photos =from app

0
Artal On

It's possible using the Photos framework. Look into PHAssetChangeRequest and the deleteAssets: method.