Maxim V. Pavlov
Maxim V. Pavlov

Reputation: 10509

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

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

Answers (3)

Ashish Kakkad
Ashish Kakkad

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

Artal
Artal

Reputation: 9143

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

Upvotes: 1

Ankit Sachan
Ankit Sachan

Reputation: 7840

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

Upvotes: 0

Related Questions