Photos Framework revertAssetContentToOriginal won't revert location property

Originator:l3rhua
Number:rdar://21153772 Date Originated:29 May 2015
Status:Open Resolved:
Product:iOS Product Version:iOS 8.3
Classification:Bug Reproducible:Always
 
My app modifies photo location info and modifies the original copy using Photos framework, by creating PHAssetChangeRequest, and assign new location to PHAssetChangeRequest.location.

When I try to revert the photo back to original by calling revertAssetContentToOriginal(), all changes made are reverted, but the location property remained with the changed value.

Steps to Reproduce:
Save the new location by the following block of codes:

PHPhotoLibrary.sharedPhotoLibrary().performChanges({
                    var changeRequest = PHAssetChangeRequest(forAsset: self.selectedPhotoAsset)
                    changeRequest.contentEditingOutput = contentEditingOutput
                    changeRequest.location = CLLocation(latitude: self.annotation.coordinate.latitude, longitude: self.annotation.coordinate.longitude)
                    }, completionHandler: {
                        (success, error) in
                        if success {
                            println("Changes made")
                        } else {
                            println("Failed to edit image: \(error)")
                        }
                    }
                )

When revertAssetContentToOriginal() being called, all changes in contentEditingOutput are reverted, but location property is still using the changed value.

Expected Results:
location property should also be reverted back to its original value

Actual Results:
location property is not reverted, still using the changed location.

Version:
iOS 8.3

Notes:
I have to manually assign the original location back to location property when revertAssetContentToOriginal() is being called, and it works only if revert is being done within my app. If the user revert changes in Photos.app, then location property will not be reverted.

Configuration:
iPhone 4S, iPhone 6 Plus

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!