Ben Roth 7fab093fc8 Fix crash when trying to load photo library assets with nil image url
Summary:
This avoids a crash when we try to load a PHAsset with nil image url. Specifically, the following condition evaluates to true when `imageURL` is nil:

```objc
if ([imageURL.scheme caseInsensitiveCompare:@"assets-library"] == NSOrderedSame) {
    assetID = [imageURL absoluteString];
    results = [PHAsset fetchAssetsWithALAssetURLs:@[imageURL] options:nil];
}
```

The crash will be "attempt to insert nil object from objects[0]" when we build the `@[imageURL]` array literal.

We've seen this emerge as a very common crash among Expo users, so I wanted to at least provide a clear error message instead of terminating the app.

Load an image from the photo library with a nil request url.
Closes https://github.com/facebook/react-native/pull/15952

Differential Revision: D5835219

Pulled By: ericnakagawa

fbshipit-source-id: 7be00a15e674a0905cf5c27c526ce9085d1b308f
2017-09-14 12:02:27 -07:00
..
2017-09-11 16:08:03 -07:00
2017-09-06 03:33:43 -07:00
2017-09-06 03:33:43 -07:00
2016-11-02 12:29:15 -07:00
2017-09-08 14:46:14 -07:00
2017-08-25 10:00:39 -07:00
2017-08-29 15:01:05 -07:00
2017-09-12 05:50:26 -07:00
2017-02-21 15:18:40 -08:00
2017-08-23 08:54:39 -07:00
2017-09-06 03:33:43 -07:00
2017-09-06 03:33:43 -07:00
2017-08-23 20:45:45 -07:00
2017-09-06 03:33:43 -07:00
2017-09-06 03:33:43 -07:00