From 3e91bd71915a86f5dcb46cbabc9b8a2951d4311c Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 23 May 2024 17:21:11 -0600 Subject: [PATCH] ios template files --- .gitignore | 4 ++++ .../platforms/ios/platform_config.sh | 18 ++++++++++++++++-- .../ios}/Runner.xcodeproj/project.pbxproj | 0 .../templates/ios}/Runner/Info.plist | 0 4 files changed, 20 insertions(+), 2 deletions(-) rename {ios => scripts/app_config/templates/ios}/Runner.xcodeproj/project.pbxproj (100%) rename {ios => scripts/app_config/templates/ios}/Runner/Info.plist (100%) diff --git a/.gitignore b/.gitignore index 668aa494c..336ba21ed 100644 --- a/.gitignore +++ b/.gitignore @@ -76,3 +76,7 @@ secp256k1.dll /android/app/src/main/profile/AndroidManifest.xml /android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt /android/app/src/main/res/**/ic_launcher.png + +/ios/Runner/Info.plist +/ios/Runner.xcodeproj/project.pbxproj +/ios/Runner/Assets.xcassets/AppIcon.appiconset \ No newline at end of file diff --git a/scripts/app_config/platforms/ios/platform_config.sh b/scripts/app_config/platforms/ios/platform_config.sh index 2dad97e5f..3041c1a86 100755 --- a/scripts/app_config/platforms/ios/platform_config.sh +++ b/scripts/app_config/platforms/ios/platform_config.sh @@ -2,6 +2,20 @@ set -x -e +F0="ios/Runner/Info.plist" +F1="ios/Runner.xcodeproj/project.pbxproj" + +TEMPLATES="${APP_PROJECT_ROOT_DIR}/scripts/app_config/templates" + +for (( i=0; i<=1; i++ )); do + VAR="F${i}" + FILE="${APP_PROJECT_ROOT_DIR}/${!VAR}" + if [ -f "${FILE}" ]; then + rm "${FILE}" + fi + cp "${TEMPLATES}/${!VAR}" "${FILE}" +done + # Configure ios for Duo. -sed -i '' "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/ios/Runner/Info.plist" -sed -i '' "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/ios/Runner.xcodeproj/project.pbxproj" +sed -i '' "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${F0}" +sed -i '' "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/${F1}" diff --git a/ios/Runner.xcodeproj/project.pbxproj b/scripts/app_config/templates/ios/Runner.xcodeproj/project.pbxproj similarity index 100% rename from ios/Runner.xcodeproj/project.pbxproj rename to scripts/app_config/templates/ios/Runner.xcodeproj/project.pbxproj diff --git a/ios/Runner/Info.plist b/scripts/app_config/templates/ios/Runner/Info.plist similarity index 100% rename from ios/Runner/Info.plist rename to scripts/app_config/templates/ios/Runner/Info.plist