how to save photo with metadat in album with PHPhotolibrary in iOS9?

HI,


I have write the following code to save photo in album. it's work fine in iOS8 but It doesn't work in iOS9.


PHPhotoLibrary.sharedPhotoLibrary().performChanges({

let assetRequest = PHAssetChangeRequest.creationRequestForAssetFromImage(newImage!)

let assetPlaceholder = assetRequest.placeholderForCreatedAsset

let albumChangeRequest = PHAssetCollectionChangeRequest(forAssetCollection: album, assets: albumFetch)

albumChangeRequest!.addAssets([assetPlaceholder!])

}, completionHandler: { success, error in

print("added image to album")

print(error)

})

I got the error "Error Domain=NSCocoaErrorDomain" in iOS9.


Please help to come out this problem.


Thanks,

Piyush

how to save photo with metadat in album with PHPhotolibrary in iOS9?
 
 
Q