I had an issue similar to this when users had their photos stored in iCloud using iCloud photo library. I was able to fix the issue by making the call asynchronous. It looks like this
let options = PHImageRequestOptions()
options.synchronous = false
options.networkAccessAllowed = true
Here is the whole function.
func getImageDataFromAsset(asset: PHAsset, completion: (data: NSData?) -> Void) {
let manager = PHImageManager.defaultManager()
let options = PHImageRequestOptions()
options.networkAccessAllowed = true
options.synchronous = false
manager.requestImageDataForAsset(asset, options: options) { (result, string, orientation, info) -> Void in
if let imageData = result {
completion(data: imageData)
} else {
completion(data: nil)
}
}
}