diff --git a/xcode/aux_scripts/import_strings.php b/xcode/aux_scripts/import_strings.php index 911e989..3f13353 100644 --- a/xcode/aux_scripts/import_strings.php +++ b/xcode/aux_scripts/import_strings.php @@ -1,5 +1,5 @@ $value) { $value_without_linefeed = preg_replace("/\r|\n/", " ", $value); - $ios_swift_strings .= "\t/// ".$value_without_linefeed."\n\t".'static let '.preg_replace_callback('/_(.?)/', function ($m) { return strtoupper($m[1]); }, $key).' = NSLocalizedString("'.$key.'", comment: "")'."\n".PHP_EOL; + $ios_swift_strings .= "\t/// ".$value_without_linefeed."\n\t".'public static let '.preg_replace_callback('/_(.?)/', function ($m) { return strtoupper($m[1]); }, $key).' = NSLocalizedString("'.$key.'", comment: "")'."\n".PHP_EOL; } $ios_swift_strings .= '}'.PHP_EOL; file_put_contents($localization.'String+Localization.swift', $ios_swift_strings); diff --git a/xcode/build_phases/api_generator.sh b/xcode/build_phases/api_generator.sh index 552a538..a16d254 100644 --- a/xcode/build_phases/api_generator.sh +++ b/xcode/build_phases/api_generator.sh @@ -6,4 +6,4 @@ link="https://dl.bintray.com/touchin/touchin-tools/ru/touchin/api-generator/${VE . build-scripts/xcode/aux_scripts/download_file.sh ${FILE_NAME} ${link} # execute api generator -java -jar "Downloads/${FILE_NAME}" generate-client-code --output-language SWIFT --specification-path common/api --output-path ${PROJECT_NAME}/Generated --single-file true +java -jar "Downloads/${FILE_NAME}" generate-client-code --output-language SWIFT --specification-path common/api --output-path ${PRODUCT_NAME}/Generated --single-file true diff --git a/xcode/build_phases/localization.sh b/xcode/build_phases/localization.sh index e363844..8c8bf61 100644 --- a/xcode/build_phases/localization.sh +++ b/xcode/build_phases/localization.sh @@ -1,4 +1,4 @@ -LOCALIZATION_PATH="${PROJECT_NAME}/Resources/Localization" +LOCALIZATION_PATH="${PRODUCT_NAME}/Resources/Localization" #first argument set strings folder path STRINGS_FOLDER=${1:-"common/strings"} @@ -13,4 +13,4 @@ if ! [ -e "${PROJECT_DIR}/${STRINGS_FOLDER}" ]; then fi #second argument set strings script path -php ${2:-build-scripts/xcode/aux_scripts/import_strings.php} ${PROJECT_NAME} ${STRINGS_FOLDER} +php ${2:-build-scripts/xcode/aux_scripts/import_strings.php} ${PRODUCT_NAME} ${STRINGS_FOLDER}