From 9ef596e601e5e24e35311dbd691a2419595c362a Mon Sep 17 00:00:00 2001 From: Michael McKinley Date: Thu, 12 May 2016 11:02:03 -0500 Subject: [PATCH 1/2] Remove CUIICatalog invalid asset name supplied error --- React/Base/RCTConvert.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index ebdbee02a5847d..f6cb235f2fd8b5 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -882,7 +882,7 @@ + (UIImage *)UIImage:(id)json NSString *scheme = URL.scheme.lowercaseString; if ([scheme isEqualToString:@"file"]) { NSString *assetName = RCTBundlePathForURL(URL); - image = [UIImage imageNamed:assetName]; + image = [UIImage imageNamed:[NSString stringWithFormat:@"%@", assetName]]; if (!image) { // Attempt to load from the file system NSString *filePath = URL.path; From 1c4ea991d99f857021b8c515168ce729233987ca Mon Sep 17 00:00:00 2001 From: Michael McKinley Date: Fri, 13 May 2016 10:24:52 -0500 Subject: [PATCH 2/2] add explicit nil check --- React/Base/RCTConvert.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index f6cb235f2fd8b5..cbc59410da5d7c 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -882,7 +882,7 @@ + (UIImage *)UIImage:(id)json NSString *scheme = URL.scheme.lowercaseString; if ([scheme isEqualToString:@"file"]) { NSString *assetName = RCTBundlePathForURL(URL); - image = [UIImage imageNamed:[NSString stringWithFormat:@"%@", assetName]]; + image = assetName ? [UIImage imageNamed:assetName] : nil; if (!image) { // Attempt to load from the file system NSString *filePath = URL.path;