From b2e8152adba922fcf5f2177b25a6f601a5335320 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Thu, 12 Mar 2020 15:29:56 +0300 Subject: [PATCH 1/2] [Issue 167] faild build if json localization is null --- xcode/aux_scripts/import_strings.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xcode/aux_scripts/import_strings.php b/xcode/aux_scripts/import_strings.php index 52f79d6..23b28e5 100644 --- a/xcode/aux_scripts/import_strings.php +++ b/xcode/aux_scripts/import_strings.php @@ -7,7 +7,7 @@ mkdir($path, 0777, true); } } - + $localization = './'.$PRODUCT_NAME.'/Resources/Localization/'; $baseFile = file_get_contents(array_pop(glob($COMMON_STRINGS_PATH.'/default*.json'))); @@ -19,6 +19,11 @@ $jsonFile = file_get_contents($file); $json = array_merge($baseJson, json_decode($jsonFile, true)); + + if ($json == null) { + echo "JSON is not valid\n"; + exit(1); + } $ios_strings = ""; foreach ($json as $key=>$value) { From 2a9d8e96e3b278bfdfa0da8a5937ec7518595d1e Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Thu, 12 Mar 2020 15:35:33 +0300 Subject: [PATCH 2/2] [Issue 167] Fix PR issue from Ivam Smolin --- xcode/aux_scripts/import_strings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcode/aux_scripts/import_strings.php b/xcode/aux_scripts/import_strings.php index 23b28e5..7cfdc7d 100644 --- a/xcode/aux_scripts/import_strings.php +++ b/xcode/aux_scripts/import_strings.php @@ -21,7 +21,7 @@ $json = array_merge($baseJson, json_decode($jsonFile, true)); if ($json == null) { - echo "JSON is not valid\n"; + echo "Invalid JSON format\n"; exit(1); }