react-native/Libraries/CameraRoll
Gaëtan Renaudeau 0010df514e iOS: Fix CameraRoll to support custom user groups
Summary:
on iOS, if you pull photo from one of user's custom album, the app crashes on the assertion `RCTAssert(resolvedPromise == NO, @"Resolved the promise before we finished processing the results.");` . assertion that was assumed to never been reached.

According to iOS doc, the enumerateGroupsWithTypes `usingBlock` block is called with `group=nil` when the iteration is over, but in current react-native implementation, it is stopping in other circumstance (because the `else` case) which is probably a mistake.

You have probably never seen the bug because you didn't tried to use getPhotos with something else than the pre-defined groups, but it should be possible to do so *(and it seems to work fine as soon as I included my fix. Later I should provide a PR that includes a way to list user groups :) but at least I need this to gets in, otherwise it crashes)*.

For instance, User have a Photo Folder (or "album", whatever you call it) called "Instagram", when I call `CameraRoll.getPhotos({ groupName: "Instagram",
Closes https://github.com/facebook/react-native/pull/10272

Differential Revision: D4009342

Pulled By: javache

fbshipit-source-id: a73ca828133b4f0d880c229f9b675538854020de
2016-10-12 11:28:50 -07:00
..
RCTCameraRoll.xcodeproj Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
CameraRoll.js Explicit information to help in linking 2016-09-01 21:43:47 -07:00
ImagePickerIOS.js fix camera roll lint warnings 2015-11-30 16:25:41 -08:00
RCTAssetsLibraryRequestHandler.h Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTAssetsLibraryRequestHandler.m Corrected bug that put the UTI instead of mimeType in retrieved assets 2016-05-03 08:53:34 -07:00
RCTCameraRollManager.h Added lightweight generic annotations 2015-11-03 14:49:30 -08:00
RCTCameraRollManager.m iOS: Fix CameraRoll to support custom user groups 2016-10-12 11:28:50 -07:00
RCTImagePickerManager.h Moved CameraRoll-related classes into CameraRoll folder instead of Image 2015-09-08 09:48:19 -08:00
RCTImagePickerManager.m ActionSheetIOS - support share sheet on modals 2016-05-20 17:13:21 -07:00
RCTPhotoLibraryImageLoader.h Moved CameraRoll-related classes into CameraRoll folder instead of Image 2015-09-08 09:48:19 -08:00
RCTPhotoLibraryImageLoader.m Add partial image loading to RCTImageView 2016-09-21 12:14:09 -07:00