PHImageManager requestImageDataForAsset returns that videos are in iCloud even when iCloud photo library is disabled

Originator:alhx
Number:rdar://45777886 Date Originated:02-Nov-2018 05:11 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:12.0.x
Classification:Serious Bug Reproducible:Always
 
Summary:
We have functionality that does not attempt to request data for a given asset unless the device is on wifi if that data needs to be fetched from iCloud. We've noticed through user report and internal reproduction that even if that video is not stored in iCloud Photo Library that videos can return `YES` from the info dictionary's `PHImageResultIsInCloudKey` even if the user does not have iCloud photo library enabled. In iOS 11 and below, we have not seen this behavior.

Steps to Reproduce:
1. Using iOS 12, take video while signed in to iCloud (or not at all) with iCloud photo library.
2. Call `[PHImageManager defaultManager] requestImageDataForAsset:asset options:options resultHandler:resultHandler]`
3. Inspect the resultHandler's input parameter dictionary passed by the Photos framework


Expected Results:
4. `[info[PHImageResultIsInCloudKey] boolValue]` should be `NO`

Actual Results:
4. `[info[PHImageResultIsInCloudKey] boolValue]` is always `YES` even we don’t have iCloud turned on

Version:
12.0.x

Notes:
```
    BOOL isCancelled = [info[PHImageCancelledKey] boolValue];
    BOOL isDegraded = [info[PHImageResultIsDegradedKey] boolValue];
    BOOL isInCloud = [info[PHImageResultIsInCloudKey] boolValue];
```

Code associated with screenshot

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!