Skip to content
Snippets Groups Projects
Commit b0c13ebe authored by Ron Heft's avatar Ron Heft Committed by Facebook Github Bot 7
Browse files

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
parent 73987803
No related merge requests found
......@@ -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;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment