Permalink
Browse files

iOS: Fix Crash when CameraRoll is getting assets from iCloud and no f…

…ilename is provided. #13671

Summary:
RCTCameraRollManager.m crashes when there is no filename provided for the asset (usually from iCloud). #13671

Tested on real device with iCloud library using the library without and after my fix. It worked after my changes.

[IOS] [BUGFIX] [CameraRoll] - Changed the filename if nil to be empty when the asset is coming from iCloud.
Closes #17549

Differential Revision: D6710665

Pulled By: hramos

fbshipit-source-id: 319865b0a71728798c62ee380e7bee4af584b3e3
  • Loading branch information...
pentarex authored and facebook-github-bot committed Jan 12, 2018
1 parent 2afe7d4 commit 2ae24361c5e0fc4aed9a321123bba8ca416a35ff
Showing with 1 addition and 1 deletion.
  1. +1 −1 Libraries/CameraRoll/RCTCameraRollManager.m
@@ -199,7 +199,7 @@ static void RCTResolvePromise(RCTPromiseResolveBlock resolve,
@"group_name": [group valueForProperty:ALAssetsGroupPropertyName],
@"image": @{
@"uri": uri,
@"filename" : filename,
@"filename" : filename ?: [NSNull null],
@"height": @(dimensions.height),
@"width": @(dimensions.width),
@"isStored": @YES,

0 comments on commit 2ae2436

Please sign in to comment.