diff --git a/bootstrap.sh b/bootstrap.sh index 74ed2c2..cf5cb0a 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -49,6 +49,15 @@ generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Info.mustache $PROJECT_NAME/ # generate file for generate xcodeproj generate "{project_name: $PROJECT_NAME, deployment_target: $DEPLOYMENT_TARGET}" $TEMPLATES/project.mustache project.yml +# generate xcconfig files +mkdir -p Configs +LOWERCASED_PROJECT_NAME=$(echo "$PROJECT_NAME" | tr '[:upper:]' '[:lower:]') +generate "{project_name: $PROJECT_NAME, identifier: "ru.touchin.$LOWERCASED_PROJECT_NAME"}" $TEMPLATES/configuration.mustache Configs/StandardDebug.xcconfig +generate "{project_name: $PROJECT_NAME, identifier: "ru.touchin.$LOWERCASED_PROJECT_NAME"}" $TEMPLATES/configuration.mustache Configs/StandardRelease.xcconfig + +generate "{project_name: $PROJECT_NAME, identifier: "com.touchin.$LOWERCASED_PROJECT_NAME"}" $TEMPLATES/configuration.mustache Configs/EnterpriseDebug.xcconfig +generate "{project_name: $PROJECT_NAME, identifier: "com.touchin.$LOWERCASED_PROJECT_NAME"}" $TEMPLATES/configuration.mustache Configs/EnterpriseRelease.xcconfig + # generate xcode project file echo "Generate xcodeproj file..." xcodegen --spec project.yml diff --git a/sources/Resources/LaunchScreen.storyboard b/sources/Resources/LaunchScreen.storyboard deleted file mode 100644 index f83f6fd..0000000 --- a/sources/Resources/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/configuration.mustache b/templates/configuration.mustache new file mode 100644 index 0000000..ece7d40 --- /dev/null +++ b/templates/configuration.mustache @@ -0,0 +1,3 @@ +PRODUCT_BUNDLE_IDENTIFIER = {{identifier}} +PRODUCT_MODULE_NAME = {{project_name}} +PRODUCT_NAME = {{project_name}} diff --git a/templates/project.mustache b/templates/project.mustache index 9d7fa95..f8f73e7 100644 --- a/templates/project.mustache +++ b/templates/project.mustache @@ -11,6 +11,11 @@ configs: EnterpriseRelease: release targets: {{project_name}}: + configFiles: + StandardDebug: Configs/StandardDebug.xcconfig + StandardRelease: Configs/StandardRelease.xcconfig + EnterpriseDebug: Configs/EnterpriseDebug.xcconfig + EnterpriseRelease: Configs/EnterpriseRelease.xcconfig type: application platform: iOS prebuildScripts: @@ -32,6 +37,7 @@ targets: - "Resources/LaunchScreen.storyboard" - "Resources/Assets.xcassets/AppIcon.appiconset/Contents.json" - "Info.plist" + - "*.xcconfig" - path: {{project_name}}/Analytics buildPhase: sources - path: {{project_name}}/Cells