Allow PhotoKit to download photos from iCloud

Summary:
Resolves #7081 by allowing iCloud to download photos not stored on the device.

**Test plan (required)**

1. Verified existing photos stored on the device still display.
2. Deleted my iCloud photo library from my phone and verified the image downloads and displays.
Closes https://github.com/facebook/react-native/pull/9530

Differential Revision: D3838470

Pulled By: mkonicek

fbshipit-source-id: 810830a4246714b6e166e4411f3fa848b1f1b71c
This commit is contained in:
Ron Heft 2016-09-08 16:20:51 -07:00 committed by Facebook Github Bot 7
parent 7398780357
commit b0c13ebe02
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,9 @@ RCT_EXPORT_MODULE()
PHAsset *asset = [results firstObject];
PHImageRequestOptions *imageOptions = [PHImageRequestOptions new];
// Allow PhotoKit to fetch images from iCloud
imageOptions.networkAccessAllowed = YES;
if (progressHandler) {
imageOptions.progressHandler = ^(double progress, NSError *error, BOOL *stop, NSDictionary<NSString *, id> *info) {
static const double multiplier = 1e6;