From f51d38783e2f048fd2899691c5c26ea742c72ed3 Mon Sep 17 00:00:00 2001 From: dmydry Date: Thu, 26 Mar 2020 11:01:09 +0100 Subject: [PATCH] fix: getPhotos crash if there is a quote in album name (#156) --- ios/RNCCameraRollManager.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/RNCCameraRollManager.m b/ios/RNCCameraRollManager.m index 24c79ca46..717048326 100644 --- a/ios/RNCCameraRollManager.m +++ b/ios/RNCCameraRollManager.m @@ -275,7 +275,8 @@ RCT_EXPORT_METHOD(getPhotos:(NSDictionary *)params PHFetchOptions *const collectionFetchOptions = [PHFetchOptions new]; collectionFetchOptions.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"endDate" ascending:NO]]; if (groupName != nil) { - collectionFetchOptions.predicate = [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"localizedTitle == '%@'", groupName]]; + collectionFetchOptions.predicate = [NSPredicate predicateWithFormat:@"localizedTitle = %@", groupName]; + } BOOL __block stopCollections_;