diff --git a/.github/workflows/ios-cd-live.yml b/.github/workflows/ios-cd-live.yml new file mode 100644 index 00000000..2bd7aada --- /dev/null +++ b/.github/workflows/ios-cd-live.yml @@ -0,0 +1,63 @@ +# This workflow will build a Swift project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift + +name: iOS CD (Live -> App Store) + +on: + push: + branches: ["env/live"] + +jobs: + deploy-appstore: + runs-on: macos-15 + + environment: AppStore-Deploy + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Select Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: "latest-stable" + + - name: Install iOS SDK (Retry up to 3 times) + run: | + for i in {1..3}; do + echo "Attempt $i to download iOS platform..." + sudo xcodebuild -downloadPlatform iOS && break || { + if [ $i -lt 3 ]; then + echo "Attempt $i failed. Retrying in 10 seconds..." + sleep 10 + else + echo "All 3 attempts failed. Moving on (continue-on-error is set)." + exit 1 + fi + } + done + + - name: Create Real Configs + run: | + echo "${{ secrets.LIVE_CONFIG_CONTENT }}" | base64 --decode > "LiveConfig.xcconfig" + echo "${{ secrets.DEV_CONFIG_CONTENT }}" | base64 --decode > "DevConfig.xcconfig" + echo "${{ secrets.STAGE_CONFIG_CONTENT }}" | base64 --decode > "StageConfig.xcconfig" + echo "${{ secrets.BASE_CONFIG_CONTENT }}" | base64 --decode > "BaseConfig.xcconfig" + + - name: Install Fastlane + run: bundle install + + - name: Build and Upload to App Store + env: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_TOKEN }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.ASC_KEY_ID }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.ASC_KEY_CONTENT }} + GYM_SCHEME: "Atcha-Live" + GYM_CONFIGURATION: "Release" + GYM_EXPORT_METHOD: "app-store" + GYM_XC_ARGS: "PROVISIONING_PROFILE_SPECIFIER='match AppStore com.atcha.iOS' CODE_SIGN_STYLE=Manual" + FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 120 + + run: bundle exec fastlane release diff --git a/.github/workflows/ios-cd-stage.yml b/.github/workflows/ios-cd-stage.yml new file mode 100644 index 00000000..95119c0a --- /dev/null +++ b/.github/workflows/ios-cd-stage.yml @@ -0,0 +1,72 @@ +# This workflow will build a Swift project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift + +name: iOS CD (Stage -> TestFlight) + +on: + push: + branches: ["env/stage"] + +jobs: + deploy-testflight: + runs-on: macos-15 + + environment: TestFlight-Deploy + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Select Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: "latest-stable" + + - name: Install iOS SDK (Retry up to 3 times) + run: | + for i in {1..3}; do + echo "Attempt $i to download iOS platform..." + sudo xcodebuild -downloadPlatform iOS && break || { + if [ $i -lt 3 ]; then + echo "Attempt $i failed. Retrying in 10 seconds..." + sleep 10 + else + echo "All 3 attempts failed. Moving on (continue-on-error is set)." + exit 1 + fi + } + done + + - name: Create Real Configs + run: | + # Xcode가 찾는 경로: /Users/runner/work/Atcha-iOS/Atcha-iOS/StageConfig.xcconfig + # checkout 후 현재 위치가 이미 그 경로이므로 바로 생성 + echo "${{ secrets.LIVE_CONFIG_CONTENT }}" | base64 --decode > "LiveConfig.xcconfig" + echo "${{ secrets.DEV_CONFIG_CONTENT }}" | base64 --decode > "DevConfig.xcconfig" + echo "${{ secrets.STAGE_CONFIG_CONTENT }}" | base64 --decode > "StageConfig.xcconfig" + echo "${{ secrets.BASE_CONFIG_CONTENT }}" | base64 --decode > "BaseConfig.xcconfig" + + echo "=== 파일 위치 확인 ===" + pwd + ls *.xcconfig + echo "=== StageConfig 내용 ===" + cat StageConfig.xcconfig + + - name: Install Fastlane + run: bundle install + + - name: Build and Upload to TestFlight + env: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_TOKEN }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.ASC_KEY_ID }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.ASC_KEY_CONTENT }} + GYM_SCHEME: "Atcha-Stage" + GYM_CONFIGURATION: "Release" + GYM_EXPORT_METHOD: "app-store" + GYM_XC_ARGS: "PROVISIONING_PROFILE_SPECIFIER='match AppStore com.atcha.iOS' CODE_SIGN_STYLE=Manual" + FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 120 + + # Fastfile에 작성된 테플 업로드용 lane 실행 (이름은 설정하신 대로 맞춰주세요) + run: bundle exec fastlane beta diff --git a/.github/workflows/ios_ci.yml b/.github/workflows/ios_ci.yml new file mode 100644 index 00000000..d0107125 --- /dev/null +++ b/.github/workflows/ios_ci.yml @@ -0,0 +1,64 @@ +# This workflow will build a Swift project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift + +name: iOS CI + +on: + pull_request: + branches: ["env/dev", "env/stage", "env/live"] + +jobs: + build: + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + + - name: Select Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: "latest-stable" + + - name: Debug toolchain + run: | + xcodebuild -version + xcodebuild -showsdks + xcrun simctl list runtimes + + - name: Install iOS SDK + # sudo를 붙여서 확실하게 권한을 주고 실행합니다. + run: sudo xcodebuild -downloadPlatform iOS + + - name: Create Dummy Configs + run: | + # 프로젝트 폴더 생성 + mkdir -p Atcha-iOS/Atcha-iOS + + # 생성할 파일 목록 (BaseConfig 추가!) + CONFIG_FILES=("BaseConfig.xcconfig" "DevConfig.xcconfig" "StageConfig.xcconfig" "LiveConfig.xcconfig") + + for FILE in "${CONFIG_FILES[@]}"; do + # 1. 루트 경로 + echo "// Dummy Config for CI" > "$FILE" + # 2. 첫 번째 하위 경로 + echo "// Dummy Config for CI" > "Atcha-iOS/$FILE" + # 3. 두 번째 하위 경로 (사진에서 본 실제 위치) + echo "// Dummy Config for CI" > "Atcha-iOS/Atcha-iOS/$FILE" + echo "Created $FILE in multiple locations" + done + + - name: Build (Any iOS Device) + run: | + xcodebuild \ + -project Atcha-iOS.xcodeproj \ + -scheme Atcha-Dev \ + -configuration Debug \ + -destination 'generic/platform=iOS' \ + -sdk iphoneos \ + IPHONEOS_DEPLOYMENT_TARGET=16.1 \ + FRAMEWORK_SEARCH_PATHS="$(inherited) $PWD $PWD/Atcha-iOS $PWD/Atcha-iOS/Atcha-iOS" \ + SWIFT_INCLUDE_PATHS="$(inherited) $PWD $PWD/Atcha-iOS $PWD/Atcha-iOS/Atcha-iOS" \ + CODE_SIGNING_ALLOWED=NO \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGN_IDENTITY="" \ + AD_HOC_CODE_SIGNING_ALLOWED=YES \ + clean build diff --git a/.gitignore b/.gitignore index b1a8d848..0896441e 100644 --- a/.gitignore +++ b/.gitignore @@ -109,5 +109,9 @@ iOSInjectionProject/ # End of https://www.toptal.com/developers/gitignore/api/swift,xcode,cocoapods *.xcconfig +DevConfig.xcconfig +StageConfig.xcconfig +LiveConfig.xcconfig +BaseConfig.xcconfig Atcha-iOS/DesignSource/AtchaImage/Icon.xcassets/Onboarding/.DS_Store diff --git a/Atcha-iOS.xcodeproj/project.pbxproj b/Atcha-iOS.xcodeproj/project.pbxproj index 6baace4b..5f8095a3 100644 --- a/Atcha-iOS.xcodeproj/project.pbxproj +++ b/Atcha-iOS.xcodeproj/project.pbxproj @@ -51,6 +51,7 @@ 6D368BB22E03BD2C00144EE7 /* SearchTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D368BB12E03BD2C00144EE7 /* SearchTextField.swift */; }; 6D368BB42E03BE9A00144EE7 /* AtchaTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D368BB32E03BE9A00144EE7 /* AtchaTextField.swift */; }; 6D52FBC12E7F07CB00D28C82 /* SessionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D52FBC02E7F07CB00D28C82 /* SessionController.swift */; }; + 6D5C790D2F47E76900936E6A /* AppCompositionRoot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5C790C2F47E76900936E6A /* AppCompositionRoot.swift */; }; 6D5E03B92E24F3A50065AFBE /* AddRecentSearchRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5E03B82E24F3A50065AFBE /* AddRecentSearchRequest.swift */; }; 6D5E03BE2E24F70B0065AFBE /* FetchRecentSearchRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5E03BD2E24F70B0065AFBE /* FetchRecentSearchRequest.swift */; }; 6D5E03C82E2881830065AFBE /* FetchRecentSearchResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5E03C72E2881830065AFBE /* FetchRecentSearchResponse.swift */; }; @@ -92,6 +93,11 @@ 6D8157462E127BDB003688A6 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6D8157452E127BDB003688A6 /* GoogleService-Info.plist */; }; 6D8157492E129A7C003688A6 /* Lottie in Frameworks */ = {isa = PBXBuildFile; productRef = 6D8157482E129A7C003688A6 /* Lottie */; }; 6D81574E2E13EC0F003688A6 /* Int+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D81574D2E13EC0F003688A6 /* Int+Ext.swift */; }; + 6D8C67A12F48363300D2F55F /* DevConfig.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 6D8C67A02F48363300D2F55F /* DevConfig.xcconfig */; }; + 6D8C67A52F48364C00D2F55F /* LiveConfig.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 6D8C67A42F48364C00D2F55F /* LiveConfig.xcconfig */; }; + 6D8C67A92F483EFA00D2F55F /* BaseConfig.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 6D8C67A82F483EFA00D2F55F /* BaseConfig.xcconfig */; }; + 6D8C67AF2F48407200D2F55F /* AppConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D8C67AE2F48407200D2F55F /* AppConfig.swift */; }; + 6D8C67B32F4879DB00D2F55F /* StageConfig.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 6D8C67B22F4879DB00D2F55F /* StageConfig.xcconfig */; }; 6D8D8AE02E013819003DABB2 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 6D8D8ADF2E013819003DABB2 /* SnapKit */; }; 6D8D8B132E01B338003DABB2 /* AtchaButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D8D8B122E01B338003DABB2 /* AtchaButton.swift */; }; 6D8D8B172E02BBC0003DABB2 /* AtchaNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D8D8B162E02BBC0003DABB2 /* AtchaNavigationBar.swift */; }; @@ -118,7 +124,6 @@ 6DB7636F2E45C6D100D06A49 /* AlarmRepositoryImpl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DB7636E2E45C6D100D06A49 /* AlarmRepositoryImpl.swift */; }; 6DB763712E45C7A300D06A49 /* AlarmRefreshResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DB763702E45C7A300D06A49 /* AlarmRefreshResponse.swift */; }; 6DB763732E45C7E800D06A49 /* AlarmRefresh.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DB763722E45C7E800D06A49 /* AlarmRefresh.swift */; }; - 6DB763752E48E11300D06A49 /* Secrets.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 6DB763742E48E11300D06A49 /* Secrets.xcconfig */; }; 6DB7637C2E48E6AC00D06A49 /* TMapSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DB763782E48E6A900D06A49 /* TMapSDK.framework */; }; 6DB7637D2E48E6AC00D06A49 /* TMapSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6DB763782E48E6A900D06A49 /* TMapSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6DB7637F2E48E6AD00D06A49 /* VSMSDK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DB763792E48E6A900D06A49 /* VSMSDK.xcframework */; }; @@ -157,7 +162,7 @@ B61C448E2E3F57B600285A4B /* AlarmManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B61C448D2E3F57B600285A4B /* AlarmManager.swift */; }; B61C44902E3F750B00285A4B /* silent.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = B61C448F2E3F750B00285A4B /* silent.mp3 */; }; B61C44952E4033E500285A4B /* LockScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B61C44942E4033E500285A4B /* LockScreenCoordinator.swift */; }; - B61C44982E40341B00285A4B /* LockScreenDIConatiner.swift in Sources */ = {isa = PBXBuildFile; fileRef = B61C44972E40341B00285A4B /* LockScreenDIConatiner.swift */; }; + B61C44982E40341B00285A4B /* LockScreenDIContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B61C44972E40341B00285A4B /* LockScreenDIContainer.swift */; }; B637D6E72E30C71500F73F14 /* AtchaPopupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B637D6E62E30C71500F73F14 /* AtchaPopupViewController.swift */; }; B637D6E92E30C72700F73F14 /* AtchaPopupViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B637D6E82E30C72700F73F14 /* AtchaPopupViewModel.swift */; }; B637D6EB2E30C75900F73F14 /* AtchaPopupInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B637D6EA2E30C75900F73F14 /* AtchaPopupInfo.swift */; }; @@ -373,6 +378,7 @@ 6D368BB12E03BD2C00144EE7 /* SearchTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchTextField.swift; sourceTree = ""; }; 6D368BB32E03BE9A00144EE7 /* AtchaTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AtchaTextField.swift; sourceTree = ""; }; 6D52FBC02E7F07CB00D28C82 /* SessionController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionController.swift; sourceTree = ""; }; + 6D5C790C2F47E76900936E6A /* AppCompositionRoot.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCompositionRoot.swift; sourceTree = ""; }; 6D5E03B82E24F3A50065AFBE /* AddRecentSearchRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddRecentSearchRequest.swift; sourceTree = ""; }; 6D5E03BD2E24F70B0065AFBE /* FetchRecentSearchRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FetchRecentSearchRequest.swift; sourceTree = ""; }; 6D5E03C72E2881830065AFBE /* FetchRecentSearchResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FetchRecentSearchResponse.swift; sourceTree = ""; }; @@ -413,6 +419,11 @@ 6D8157432E126C45003688A6 /* LockViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LockViewController.swift; sourceTree = ""; }; 6D8157452E127BDB003688A6 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 6D81574D2E13EC0F003688A6 /* Int+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Ext.swift"; sourceTree = ""; }; + 6D8C67A02F48363300D2F55F /* DevConfig.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DevConfig.xcconfig; sourceTree = ""; }; + 6D8C67A42F48364C00D2F55F /* LiveConfig.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = LiveConfig.xcconfig; sourceTree = ""; }; + 6D8C67A82F483EFA00D2F55F /* BaseConfig.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = BaseConfig.xcconfig; sourceTree = ""; }; + 6D8C67AE2F48407200D2F55F /* AppConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppConfig.swift; sourceTree = ""; }; + 6D8C67B22F4879DB00D2F55F /* StageConfig.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = StageConfig.xcconfig; sourceTree = ""; }; 6D8D8B122E01B338003DABB2 /* AtchaButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AtchaButton.swift; sourceTree = ""; }; 6D8D8B162E02BBC0003DABB2 /* AtchaNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AtchaNavigationBar.swift; sourceTree = ""; }; 6D91A8E32E29F5B30081BAFC /* CourseSettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseSettingViewController.swift; sourceTree = ""; }; @@ -437,7 +448,6 @@ 6DB7636E2E45C6D100D06A49 /* AlarmRepositoryImpl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlarmRepositoryImpl.swift; sourceTree = ""; }; 6DB763702E45C7A300D06A49 /* AlarmRefreshResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlarmRefreshResponse.swift; sourceTree = ""; }; 6DB763722E45C7E800D06A49 /* AlarmRefresh.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlarmRefresh.swift; sourceTree = ""; }; - 6DB763742E48E11300D06A49 /* Secrets.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Secrets.xcconfig; sourceTree = ""; }; 6DB763782E48E6A900D06A49 /* TMapSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = TMapSDK.framework; sourceTree = ""; }; 6DB763792E48E6A900D06A49 /* VSMSDK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = VSMSDK.xcframework; sourceTree = ""; }; 6DB763832E4D710900D06A49 /* SSEParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSEParser.swift; sourceTree = ""; }; @@ -467,7 +477,7 @@ B61C448D2E3F57B600285A4B /* AlarmManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlarmManager.swift; sourceTree = ""; }; B61C448F2E3F750B00285A4B /* silent.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = silent.mp3; sourceTree = ""; }; B61C44942E4033E500285A4B /* LockScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LockScreenCoordinator.swift; sourceTree = ""; }; - B61C44972E40341B00285A4B /* LockScreenDIConatiner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LockScreenDIConatiner.swift; sourceTree = ""; }; + B61C44972E40341B00285A4B /* LockScreenDIContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LockScreenDIContainer.swift; sourceTree = ""; }; B637D6E62E30C71500F73F14 /* AtchaPopupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AtchaPopupViewController.swift; sourceTree = ""; }; B637D6E82E30C72700F73F14 /* AtchaPopupViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AtchaPopupViewModel.swift; sourceTree = ""; }; B637D6EA2E30C75900F73F14 /* AtchaPopupInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AtchaPopupInfo.swift; sourceTree = ""; }; @@ -1090,7 +1100,10 @@ 6DE42B842DFDE6360041344C = { isa = PBXGroup; children = ( - 6DB763742E48E11300D06A49 /* Secrets.xcconfig */, + 6D8C67A82F483EFA00D2F55F /* BaseConfig.xcconfig */, + 6D8C67A02F48363300D2F55F /* DevConfig.xcconfig */, + 6D8C67A42F48364C00D2F55F /* LiveConfig.xcconfig */, + 6D8C67B22F4879DB00D2F55F /* StageConfig.xcconfig */, B68309632E005ADE00E2D029 /* .gitignore */, B68309522E005A3600E2D029 /* Atcha-iOS */, 6DE42B8E2DFDE6360041344C /* Products */, @@ -1136,7 +1149,7 @@ B61C44962E40340C00285A4B /* LockScreen */ = { isa = PBXGroup; children = ( - B61C44972E40341B00285A4B /* LockScreenDIConatiner.swift */, + B61C44972E40341B00285A4B /* LockScreenDIContainer.swift */, ); path = LockScreen; sourceTree = ""; @@ -1237,6 +1250,7 @@ B683093B2E005A3600E2D029 /* AppDelegate.swift */, B683093C2E005A3600E2D029 /* SceneDelegate.swift */, B65C12D62E0429B30016D2F0 /* AppFlowCoordinator.swift */, + 6D8C67AE2F48407200D2F55F /* AppConfig.swift */, ); path = App; sourceTree = ""; @@ -1259,6 +1273,7 @@ B65C12D92E042A740016D2F0 /* AppDIContainer.swift */, B65C130D2E057D4D0016D2F0 /* NetworkDIContainer.swift */, B65C13452E07A0D70016D2F0 /* CoordinatorFactory.swift */, + 6D5C790C2F47E76900936E6A /* AppCompositionRoot.swift */, ); path = DIContainer; sourceTree = ""; @@ -1992,18 +2007,21 @@ buildActionMask = 2147483647; files = ( B68309582E005A3600E2D029 /* Colors.xcassets in Resources */, - 6DB763752E48E11300D06A49 /* Secrets.xcconfig in Resources */, B68309592E005A3600E2D029 /* Pretendard-Bold.otf in Resources */, 6D6879BE2E4067B400E59C55 /* Refresh.json in Resources */, + 6D8C67B32F4879DB00D2F55F /* StageConfig.xcconfig in Resources */, B683095A2E005A3600E2D029 /* Pretendard-ExtraBold.otf in Resources */, B683095B2E005A3600E2D029 /* Pretendard-Medium.otf in Resources */, B683095C2E005A3600E2D029 /* Pretendard-Regular.otf in Resources */, + 6D8C67A12F48363300D2F55F /* DevConfig.xcconfig in Resources */, B61C44902E3F750B00285A4B /* silent.mp3 in Resources */, 6D8157462E127BDB003688A6 /* GoogleService-Info.plist in Resources */, + 6D8C67A52F48364C00D2F55F /* LiveConfig.xcconfig in Resources */, B683095D2E005A3600E2D029 /* Pretendard-SemiBold.otf in Resources */, 6DEE30AF2ED4102D00E35368 /* siren.mp3 in Resources */, 6D74AE3C2EAA123E00FB8D52 /* Character_Jump.json in Resources */, 6D79F9AD2E6D75EC00BD8BC8 /* Alarm.json in Resources */, + 6D8C67A92F483EFA00D2F55F /* BaseConfig.xcconfig in Resources */, B683095E2E005A3600E2D029 /* Icon.xcassets in Resources */, B683095F2E005A3600E2D029 /* Assets.xcassets in Resources */, B68309612E005A3600E2D029 /* LaunchScreen.storyboard in Resources */, @@ -2201,6 +2219,7 @@ B65C133B2E069B4D0016D2F0 /* RefreshTokenResponse.swift in Sources */, B6FB20882E1BE4F40032751B /* FetchTaxiFareRepository.swift in Sources */, B655AFBA2E3C26A9008BFDE4 /* DetailRouteEndCell.swift in Sources */, + 6D5C790D2F47E76900936E6A /* AppCompositionRoot.swift in Sources */, B69A046B2E90DE0100CA382C /* UpdateAppVersionUseCase.swift in Sources */, 6D2B8CA22E39A74100608104 /* BusOperationInfo.swift in Sources */, 6D6879C02E40684C00E59C55 /* RefreshView.swift in Sources */, @@ -2252,7 +2271,7 @@ 6D2B8CBE2E39C9CB00608104 /* BusInfoRepository.swift in Sources */, 6D5E03BE2E24F70B0065AFBE /* FetchRecentSearchRequest.swift in Sources */, 6D2B8CAB2E39A9E500608104 /* BusOperationInfoResponse.swift in Sources */, - B61C44982E40341B00285A4B /* LockScreenDIConatiner.swift in Sources */, + B61C44982E40341B00285A4B /* LockScreenDIContainer.swift in Sources */, 6D6879DC2E43703200E59C55 /* PushAlarmPatchRequest.swift in Sources */, B6DC7C1D2E169F37005D8E17 /* MapBottomType.swift in Sources */, B65C134A2E07A1280016D2F0 /* MyPageRouter.swift in Sources */, @@ -2289,6 +2308,7 @@ B65C13002E057B2A0016D2F0 /* NetworkLogger.swift in Sources */, 6D1EE2E72E09A43700F7BBF1 /* PushAlarmViewModel.swift in Sources */, B6AC8BD72E2A82C300410ECD /* MyAccountDIContainer.swift in Sources */, + 6D8C67AF2F48407200D2F55F /* AppConfig.swift in Sources */, 6D1EE2DC2E08E4EA00F7BBF1 /* HomeRegisterViewModel.swift in Sources */, B6B57EC52E1AB0FE00B29EB1 /* MainRoute.swift in Sources */, ); @@ -2316,17 +2336,75 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 6DE42BA12DFDE6370041344C /* Debug */ = { + 6D8C67B02F4879C800D2F55F /* Stage */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6D8C67B22F4879DB00D2F55F /* StageConfig.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 23SCTLK482; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.5; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Stage; + }; + 6D8C67B12F4879C800D2F55F /* Stage */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6DB763742E48E11300D06A49 /* Secrets.xcconfig */; + baseConfigurationReference = 6D8C67B22F4879DB00D2F55F /* StageConfig.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = "Atcha-iOS/Atcha-iOS.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 15; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 23SCTLK482; FRAMEWORK_SEARCH_PATHS = ( @@ -2353,7 +2431,54 @@ PRODUCT_BUNDLE_IDENTIFIER = com.atcha.iOS; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Atcha Debug"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.atcha.iOS"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Stage; + }; + 6DE42BA12DFDE6370041344C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6D8C67A02F48363300D2F55F /* DevConfig.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "Atcha-iOS/Atcha-iOS.entitlements"; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 15; + DEVELOPMENT_TEAM = 23SCTLK482; + EXCLUDED_ARCHS = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Atcha-iOS", + "$(PROJECT_DIR)", + ); + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Atcha-iOS/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "앗차"; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.navigation"; + INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "정확한 막차 경로를 제공하기 위해 권한이 필요합니다"; + INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "정확한 막차 경로를 제공하기 위해 권한이 필요합니다"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + IPHONEOS_DEPLOYMENT_TARGET = 16.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.7; + OTHER_SWIFT_FLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.atcha.iOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -2366,7 +2491,7 @@ }; 6DE42BA22DFDE6370041344C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6DB763742E48E11300D06A49 /* Secrets.xcconfig */; + baseConfigurationReference = 6D8C67A42F48364C00D2F55F /* LiveConfig.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -2374,7 +2499,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 15; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 23SCTLK482; FRAMEWORK_SEARCH_PATHS = ( @@ -2401,7 +2526,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.atcha.iOS; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Atcha Release"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.atcha.iOS"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -2414,7 +2539,7 @@ }; 6DE42BA32DFDE6370041344C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6DB763742E48E11300D06A49 /* Secrets.xcconfig */; + baseConfigurationReference = 6D8C67A02F48363300D2F55F /* DevConfig.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; @@ -2479,7 +2604,7 @@ }; 6DE42BA42DFDE6370041344C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6DB763742E48E11300D06A49 /* Secrets.xcconfig */; + baseConfigurationReference = 6D8C67A42F48364C00D2F55F /* LiveConfig.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; @@ -2543,6 +2668,7 @@ buildConfigurations = ( 6DE42BA32DFDE6370041344C /* Debug */, 6DE42BA42DFDE6370041344C /* Release */, + 6D8C67B02F4879C800D2F55F /* Stage */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2552,6 +2678,7 @@ buildConfigurations = ( 6DE42BA12DFDE6370041344C /* Debug */, 6DE42BA22DFDE6370041344C /* Release */, + 6D8C67B12F4879C800D2F55F /* Stage */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Atcha-iOS.xcodeproj/xcshareddata/xcschemes/Atcha-Dev.xcscheme b/Atcha-iOS.xcodeproj/xcshareddata/xcschemes/Atcha-Dev.xcscheme new file mode 100644 index 00000000..1d60ab6c --- /dev/null +++ b/Atcha-iOS.xcodeproj/xcshareddata/xcschemes/Atcha-Dev.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Atcha-iOS.xcodeproj/xcshareddata/xcschemes/Atcha-Live.xcscheme b/Atcha-iOS.xcodeproj/xcshareddata/xcschemes/Atcha-Live.xcscheme new file mode 100644 index 00000000..e3c07a7f --- /dev/null +++ b/Atcha-iOS.xcodeproj/xcshareddata/xcschemes/Atcha-Live.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Atcha-iOS.xcodeproj/xcshareddata/xcschemes/Atcha-Stage.xcscheme b/Atcha-iOS.xcodeproj/xcshareddata/xcschemes/Atcha-Stage.xcscheme new file mode 100644 index 00000000..9da37de4 --- /dev/null +++ b/Atcha-iOS.xcodeproj/xcshareddata/xcschemes/Atcha-Stage.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Atcha-iOS/App/AppConfig.swift b/Atcha-iOS/App/AppConfig.swift new file mode 100644 index 00000000..0cf35f5f --- /dev/null +++ b/Atcha-iOS/App/AppConfig.swift @@ -0,0 +1,24 @@ +// +// AppConfig.swift +// Atcha-iOS +// +// Created by wodnd on 2/20/26. +// + +import Foundation + +enum AppConfig { + private static func required(_ key: String) -> String { + guard let value = Bundle.main.object(forInfoDictionaryKey: key) as? String, + !value.isEmpty else { + fatalError("Missing Info.plist key: \(key)") + } + return value + } + + static var apiBaseURL: String { required("API_BASE_URL") } + static var kakaoApiKey: String { required("KAKAO_API_KEY") } + static var kakaoInitKey: String { required("KAKAO_INIT_KEY") } + static var tmapApiKey: String { required("TMAP_API_KEY") } + static var amplitudeApiKey: String { required("AMPLITUDE_API_KEY") } +} diff --git a/Atcha-iOS/App/AppDelegate.swift b/Atcha-iOS/App/AppDelegate.swift index 44a9d948..6ab27163 100644 --- a/Atcha-iOS/App/AppDelegate.swift +++ b/Atcha-iOS/App/AppDelegate.swift @@ -19,22 +19,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD UNUserNotificationCenter.current().delegate = self // MARK: - Kakao - print("Bundle.main.kakaoInitKey : \(Bundle.main.kakaoApiKey)") - KakaoSDK.initSDK(appKey: Bundle.main.kakaoApiKey) + KakaoSDK.initSDK(appKey: AppConfig.kakaoApiKey) // MARK: - Firebase FirebaseApp.configure() Messaging.messaging().delegate = self application.registerForRemoteNotifications() - + AmplitudeManager.shared.reset() let savedId = UserDefaultsWrapper.shared.integer(forKey: UserDefaultsWrapper.Key.userId.rawValue) AmplitudeManager.shared.start( - environment: .auto, userId: savedId, autocapture: [.sessions, .appLifecycles], - logLevel: .WARN + logLevel: .warn ) AmplitudeManager.shared.flush() diff --git a/Atcha-iOS/App/DIContainer/AppCompositionRoot.swift b/Atcha-iOS/App/DIContainer/AppCompositionRoot.swift new file mode 100644 index 00000000..7dbaa426 --- /dev/null +++ b/Atcha-iOS/App/DIContainer/AppCompositionRoot.swift @@ -0,0 +1,74 @@ +// +// AppCompositionRoot.swift +// Atcha-iOS +// +// Created by Assistant on 2/20/26. +// + +import UIKit +import Foundation + +/// AppCompositionRoot is the single place where the application's dependency graph is built. +/// It replaces ad-hoc global/service-locator access by composing and owning all feature DI containers +/// and wiring Presentation/Domain/Data via constructor injection. +final class AppCompositionRoot { + // MARK: Core dependencies + let tokenStorage: TokenStorage + let networkDIContainer: NetworkDIContainer + let apiService: APIService + let noHeaderApiService: APIService + let locationStateHolder: LocationStateHolder + + // MARK: Feature DI containers + let splashDIContainer: SplashDIContainer + let loginDIContainer: LoginDIContainer + let onboardingDIContainer: OnboardingDIContainer + let mainDIContainer: MainDIContainer + let lockScreenDIContainer: LockScreenDIContainer + + // MARK: - Init + init() { + // Core + self.tokenStorage = TokenStorageImpl() + self.networkDIContainer = NetworkDIContainer(tokenStorage: tokenStorage) + self.apiService = networkDIContainer.makeAPIService() + self.noHeaderApiService = networkDIContainer.makeAPIService(useInterceptor: false) + self.locationStateHolder = LocationStateHolder() + + // Features + self.splashDIContainer = SplashDIContainer(apiService: apiService) + self.loginDIContainer = LoginDIContainer(apiService: noHeaderApiService) + self.onboardingDIContainer = OnboardingDIContainer(apiService: apiService, + locationStateHolder: locationStateHolder) + self.mainDIContainer = MainDIContainer(apiService: apiService, + locationStateHolder: locationStateHolder) + self.lockScreenDIContainer = LockScreenDIContainer(apiService: apiService) + } +} + +// MARK: - Coordinator factories forwarding +extension AppCompositionRoot: SplashCoordinatorFactory, + LoginCoordinatorFactory, + OnboardingCoordinatorFactory, + MainCoordinatorFactory, + LockScreenCoordinatorFactory { + func makeSplashCoordinator(navigationController: UINavigationController) -> SplashCoordinator { + return splashDIContainer.makeSplashCoordinator(navigationController: navigationController) + } + + func makeLoginCoordinator(navigationController: UINavigationController) -> LoginCoordinator { + return loginDIContainer.makeLoginCoordinator(navigationController: navigationController) + } + + func makeOnboardingCoordinator(navigationController: UINavigationController) -> OnboardingCoordinator { + return onboardingDIContainer.makeOnboardingCoordinator(navigationController: navigationController) + } + + func makeMainCoordinator(navigationController: UINavigationController) -> MainCoordinator { + return mainDIContainer.makeMainCoordinator(navigationController: navigationController) + } + + func makeLockScreenCoordinator(navigationController: UINavigationController) -> LockScreenCoordinator { + return lockScreenDIContainer.makeLockScreenCoordinator(navigationController: navigationController) + } +} diff --git a/Atcha-iOS/App/DIContainer/AppDIContainer.swift b/Atcha-iOS/App/DIContainer/AppDIContainer.swift index bdeb150f..aceaf2d4 100644 --- a/Atcha-iOS/App/DIContainer/AppDIContainer.swift +++ b/Atcha-iOS/App/DIContainer/AppDIContainer.swift @@ -9,6 +9,8 @@ import UIKit import Foundation final class AppDIContainer { + private let compositionRoot: AppCompositionRoot + @available(*, deprecated, message: "Use AppCompositionRoot and pass it from SceneDelegate instead.") static let shared = AppDIContainer() var tokenStorage: TokenStorage @@ -20,21 +22,25 @@ final class AppDIContainer { let onboardingDIContainer: OnboardingDIContainer let lockScreenDIContainer: LockScreenDIContainer - let locationStateHolder: LocationStateHolder = LocationStateHolder() + let locationStateHolder: LocationStateHolder private init() { - self.tokenStorage = TokenStorageImpl() - self.networkDIContainer = NetworkDIContainer(tokenStorage: tokenStorage) - - let apiServce: APIService = networkDIContainer.makeAPIService() - let noHeaderApiService: APIService = networkDIContainer.makeAPIService(useInterceptor: false) - - self.splashDIContainer = SplashDIContainer(apiService: apiServce) - self.loginDIContainer = LoginDIContainer(apiService: noHeaderApiService) - self.onboardingDIContainer = OnboardingDIContainer(apiService: apiServce, - locationStateHolder: locationStateHolder) - self.mainDIContainer = MainDIContainer(apiService: apiServce, - locationStateHolder: locationStateHolder) - self.lockScreenDIContainer = LockScreenDIContainer(apiService: apiServce) + // Forward to a single composition root to unify dependency creation + self.compositionRoot = AppCompositionRoot() + + // Core + self.tokenStorage = compositionRoot.tokenStorage + self.networkDIContainer = compositionRoot.networkDIContainer + + // Features + self.splashDIContainer = compositionRoot.splashDIContainer + self.loginDIContainer = compositionRoot.loginDIContainer + self.onboardingDIContainer = compositionRoot.onboardingDIContainer + self.mainDIContainer = compositionRoot.mainDIContainer + self.lockScreenDIContainer = compositionRoot.lockScreenDIContainer + + // Shared state holders + self.locationStateHolder = compositionRoot.locationStateHolder } } + diff --git a/Atcha-iOS/App/DIContainer/CoordinatorFactory.swift b/Atcha-iOS/App/DIContainer/CoordinatorFactory.swift index 5055ae6f..5c5f7528 100644 --- a/Atcha-iOS/App/DIContainer/CoordinatorFactory.swift +++ b/Atcha-iOS/App/DIContainer/CoordinatorFactory.swift @@ -8,6 +8,10 @@ import UIKit import Foundation +/// CoordinatorFactory protocols define how feature coordinators are constructed. +/// These protocols are conformed to by the application's composition root (see `AppCompositionRoot`) +/// to avoid service locator style lookups and to enable constructor injection of dependencies. + protocol SplashCoordinatorFactory { func makeSplashCoordinator(navigationController: UINavigationController) -> SplashCoordinator } @@ -28,6 +32,9 @@ protocol LockScreenCoordinatorFactory { func makeLockScreenCoordinator(navigationController: UINavigationController) -> LockScreenCoordinator } +/// A convenience alias that groups all coordinator factory protocols used to bootstrap flows. +typealias AppCoordinatorFactory = SplashCoordinatorFactory & LoginCoordinatorFactory & OnboardingCoordinatorFactory & MainCoordinatorFactory & LockScreenCoordinatorFactory + extension AppDIContainer: SplashCoordinatorFactory, LoginCoordinatorFactory, OnboardingCoordinatorFactory, @@ -53,3 +60,4 @@ extension AppDIContainer: SplashCoordinatorFactory, return lockScreenDIContainer.makeLockScreenCoordinator(navigationController: navigationController) } } + diff --git a/Atcha-iOS/App/DIContainer/LockScreen/LockScreenDIConatiner.swift b/Atcha-iOS/App/DIContainer/LockScreen/LockScreenDIContainer.swift similarity index 99% rename from Atcha-iOS/App/DIContainer/LockScreen/LockScreenDIConatiner.swift rename to Atcha-iOS/App/DIContainer/LockScreen/LockScreenDIContainer.swift index 07602c80..563c8f06 100644 --- a/Atcha-iOS/App/DIContainer/LockScreen/LockScreenDIConatiner.swift +++ b/Atcha-iOS/App/DIContainer/LockScreen/LockScreenDIContainer.swift @@ -14,7 +14,7 @@ final class LockScreenDIContainer { self.apiService = apiService } - private lazy var fetchTaxiFareUseCase = FetchTaxiFareUseCaseImpl(repository: FetchTaxiFareRepositoryImpl(apiService: apiService, )) + private lazy var fetchTaxiFareUseCase = FetchTaxiFareUseCaseImpl(repository: FetchTaxiFareRepositoryImpl(apiService: apiService)) func makeLockScreenViewModel() -> LockViewModel { return LockViewModel(taxiFare: 0, diff --git a/Atcha-iOS/Core/Manager/Amplitude/AmplitudeManager.swift b/Atcha-iOS/Core/Manager/Amplitude/AmplitudeManager.swift index d3c3a718..8bf74eec 100644 --- a/Atcha-iOS/Core/Manager/Amplitude/AmplitudeManager.swift +++ b/Atcha-iOS/Core/Manager/Amplitude/AmplitudeManager.swift @@ -13,36 +13,32 @@ import UIKit final class AmplitudeManager { static let shared = AmplitudeManager() private init() {} - + private let queue = DispatchQueue(label: "amp.manager.queue") private var client: Amplitude? - - private(set) var environment: Environment = .dev - + private var timers: [String: Date] = [:] + // MARK: Public API - + func start( - environment: Environment = .auto, userId: Int? = nil, autocapture: AutocaptureOptions = [.sessions, .appLifecycles], - logLevel: LogLevelEnum = .WARN + logLevel: LogLevelEnum = .warn ) { - let resolvedEnv = environment.resolved() - self.environment = resolvedEnv - - let apiKey = Self.readApiKey(for: resolvedEnv) - guard let apiKey else { - assertionFailure("[AmplitudeManager] Missing API Key for \(resolvedEnv). Check Info.plist.") + // 빌드 환경(xcconfig)이 이미 AMPLITUDE_API_KEY를 주입하므로 여기서는 하나만 읽는다 + let apiKey = Self.readApiKey() + guard let apiKey, !apiKey.isEmpty else { + assertionFailure("[AmplitudeManager] Missing AMPLITUDE_API_KEY. Check Info.plist + xcconfig mapping.") return } - + let config = Configuration( apiKey: apiKey, logLevel: logLevel, autocapture: autocapture ) - + queue.sync { let c = Amplitude(configuration: config) if let uid = userId { @@ -51,18 +47,18 @@ final class AmplitudeManager { self.client = c } } - + func bindUser(id: String) { queue.async { [weak self] in guard let self, let client = self.client else { return } client.setUserId(userId: "USER_ID: \(id)") } } - + func track(_ event: AmplitudeEvent, _ properties: [String: Any?] = [:]) { track(event.rawValue, properties) } - + func track(_ event: String, _ properties: [String: Any?] = [:]) { queue.async { [weak self] in guard let self, let client = self.client else { return } @@ -70,86 +66,61 @@ final class AmplitudeManager { client.track(eventType: event, eventProperties: props) } } - + func trackScreen(_ screen: ScreenName, _ properties: [String: Any?] = [:]) { var props = properties - props[AmplitudePropertyKey.screenName.rawValue] = screen.rawValue + props[AmplitudePropertyKey.screenName.rawValue] = screen.rawValue track("screen_view", props) } - - func identify(set: [String: Any?] = [:], - add: [String: Double] = [:], - unset: [String] = [], - append: [String: Any?] = [:], - setOnce: [String: Any?] = [:]) { + + func identify( + set: [String: Any?] = [:], + add: [String: Double] = [:], + unset: [String] = [], + append: [String: Any?] = [:], + setOnce: [String: Any?] = [:] + ) { queue.async { [weak self] in - guard let self = self, let client = self.client else { return } + guard let self, let client = self.client else { return } let i = Identify() set.forEach { i.set(property: $0.key, value: $0.value) } + add.forEach { i.add(property: $0.key, value: $0.value) } // 기존 코드에 add 미적용이어서 반영 unset.forEach { i.unset(property: $0) } append.forEach { i.append(property: $0.key, value: $0.value) } setOnce.forEach { i.setOnce(property: $0.key, value: $0.value) } client.identify(identify: i) } } - + func setUserProperties(_ properties: [String: Any?]) { identify(set: properties) } - + func reset() { queue.async { [weak self] in guard let self, let client = self.client else { return } client.reset() } } - + func flush() { queue.async { [weak self] in guard let self, let client = self.client else { return } client.flush() } } - + var deviceId: String? { queue.sync { client?.getDeviceId() } } } -// MARK: - Environment -extension AmplitudeManager { - enum Environment: String { - case dev - case prod - case auto - - func resolved() -> Environment { - switch self { - case .dev, .prod: return self - case .auto: -#if DEBUG - return .dev -#else - return .prod -#endif - } - } - } -} - // MARK: - Helpers private extension AmplitudeManager { - static func readApiKey(for env: Environment) -> String? { - let keyName: String = { - switch env { - case .dev: return "AMPLITUDE_API_KEY_DEV" - case .prod: return "AMPLITUDE_API_KEY_PROD" - case .auto: return "AMPLITUDE_API_KEY_DEV" - } - }() - return Bundle.main.object(forInfoDictionaryKey: keyName) as? String + static func readApiKey() -> String? { + Bundle.main.object(forInfoDictionaryKey: "AMPLITUDE_API_KEY") as? String } - + static func clean(_ dict: [String: Any?]) -> [String: Any] { var out: [String: Any] = [:] dict.forEach { k, v in if let v = v { out[k] = v } } @@ -169,7 +140,7 @@ extension AmplitudeManager { func timerStart(_ key: String) { queue.async { [weak self] in self?.timers[key] = Date() } } - + /// 타이머 종료(초 단위 반환). 없으면 0 @discardableResult func timerEndSeconds(_ key: String) -> Int { @@ -178,7 +149,7 @@ extension AmplitudeManager { guard let s = start else { return 0 } return Int(Date().timeIntervalSince(s).rounded()) } - + /// 사용자 프로퍼티 값을 누적(+) func incrementUserProperty(_ key: String, by value: Double = 1) { queue.async { [weak self] in @@ -190,7 +161,6 @@ extension AmplitudeManager { } } - typealias AmpProps = [String: Any?] func props(_ items: (String, Any)... ) -> AmpProps { diff --git a/Atcha-iOS/Core/Network/NetworkConstant.swift b/Atcha-iOS/Core/Network/NetworkConstant.swift index 5cc012e3..a14efc21 100644 --- a/Atcha-iOS/Core/Network/NetworkConstant.swift +++ b/Atcha-iOS/Core/Network/NetworkConstant.swift @@ -8,10 +8,6 @@ import Foundation struct NetworkConstant { - #if DEBUG - static let baseURL = "https://atcha.p-e.kr/api" - #else - static let baseURL = "https://atcha.online/api" - #endif + static let baseURL = AppConfig.apiBaseURL static let timeoutInterval: TimeInterval = 30 } diff --git a/Atcha-iOS/Core/ViewWrapper/TMapWrapper.swift b/Atcha-iOS/Core/ViewWrapper/TMapWrapper.swift index 8747e2ad..4ee2d96b 100644 --- a/Atcha-iOS/Core/ViewWrapper/TMapWrapper.swift +++ b/Atcha-iOS/Core/ViewWrapper/TMapWrapper.swift @@ -35,7 +35,7 @@ final class TMapWrapper: NSObject, MapRendering { } private func configureDefaultSettings() { - mapView.setApiKey(Bundle.main.tMapKey) + mapView.setApiKey(AppConfig.tmapApiKey) mapView.delegate = self mapView.locationDelgate = self } diff --git a/Atcha-iOS/DesignSource/AtchaColor/AtchaColor.swift b/Atcha-iOS/DesignSource/AtchaColor/AtchaColor.swift index c81ac046..96a5e006 100644 --- a/Atcha-iOS/DesignSource/AtchaColor/AtchaColor.swift +++ b/Atcha-iOS/DesignSource/AtchaColor/AtchaColor.swift @@ -10,8 +10,8 @@ import UIKit enum AtchaColor{ // MARK: - Static - static let black = UIColor(named: "black")! - static let white = UIColor(named: "white")! + static let black = UIColor(named: "atcha_black")! + static let white = UIColor(named: "atcha_white")! // MARK: - Primary static let main = UIColor(named: "Main")! diff --git a/Atcha-iOS/DesignSource/AtchaColor/Colors.xcassets/Static/black.colorset/Contents.json b/Atcha-iOS/DesignSource/AtchaColor/Colors.xcassets/Static/atcha_black.colorset/Contents.json similarity index 100% rename from Atcha-iOS/DesignSource/AtchaColor/Colors.xcassets/Static/black.colorset/Contents.json rename to Atcha-iOS/DesignSource/AtchaColor/Colors.xcassets/Static/atcha_black.colorset/Contents.json diff --git a/Atcha-iOS/DesignSource/AtchaColor/Colors.xcassets/Static/white.colorset/Contents.json b/Atcha-iOS/DesignSource/AtchaColor/Colors.xcassets/Static/atcha_white.colorset/Contents.json similarity index 100% rename from Atcha-iOS/DesignSource/AtchaColor/Colors.xcassets/Static/white.colorset/Contents.json rename to Atcha-iOS/DesignSource/AtchaColor/Colors.xcassets/Static/atcha_white.colorset/Contents.json diff --git a/Atcha-iOS/Info.plist b/Atcha-iOS/Info.plist index 00bc881e..29cd94cd 100644 --- a/Atcha-iOS/Info.plist +++ b/Atcha-iOS/Info.plist @@ -63,10 +63,11 @@ audio fetch - - AMPLITUDE_API_KEY_DEV - d86e50cb1ffbb7dbd8959cd7f0fd0783 - AMPLITUDE_API_KEY_PROD - c222c45a017aa5a6767080a24e8cd729 + AMPLITUDE_API_KEY + $(AMPLITUDE_API_KEY) + API_BASE_URL + $(API_BASE_URL) + ITSAppUsesNonExemptEncryption + diff --git a/Atcha-iOS/Presentation/Common/BaseViewController.swift b/Atcha-iOS/Presentation/Common/BaseViewController.swift index 74283231..d4738e3d 100644 --- a/Atcha-iOS/Presentation/Common/BaseViewController.swift +++ b/Atcha-iOS/Presentation/Common/BaseViewController.swift @@ -54,7 +54,7 @@ class BaseViewController: UIViewController { navigationController?.interactivePopGestureRecognizer?.delegate = self as? any UIGestureRecognizerDelegate } - func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { + @objc func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { return navigationController?.viewControllers.count ?? 0 > 1 } diff --git a/Atcha-iOS/Presentation/Login/LoginViewController.swift b/Atcha-iOS/Presentation/Login/LoginViewController.swift index f21596ef..968d7529 100644 --- a/Atcha-iOS/Presentation/Login/LoginViewController.swift +++ b/Atcha-iOS/Presentation/Login/LoginViewController.swift @@ -8,6 +8,7 @@ import UIKit import SnapKit import AuthenticationServices +import QuartzCore final class LoginViewController: BaseViewController { private var appleLoginDelegateWrapper: AppleLoginDelegateWrapper? @@ -20,6 +21,8 @@ final class LoginViewController: BaseViewController { private let multiplier = 3 // 실제 아이템 수 * multiplier 만큼 셀 생성 private var isInitialSetup = true + private let gradientLayer = CAGradientLayer() + private lazy var collectionView: UICollectionView = { let layout = UICollectionViewFlowLayout() layout.scrollDirection = .horizontal @@ -58,6 +61,8 @@ final class LoginViewController: BaseViewController { override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() + gradientLayer.frame = backgroundImageView.bounds + // 컬렉션뷰 레이아웃이 완료된 후 중간 위치로 초기화 if isInitialSetup { let itemCount = LoginIntro.allCases.count @@ -88,7 +93,15 @@ final class LoginViewController: BaseViewController { private func setupUI() { view.addSubViews(backgroundImageView, pageControl, collectionView, loginButtonStackView) - backgroundImageView.image = UIImage.splashBG + // 수직 그라데이션 배경 적용 (top: #121212, bottom: #1E1E1E) + let topColor = UIColor(red: 0x12/255.0, green: 0x12/255.0, blue: 0x12/255.0, alpha: 1.0) + let bottomColor = UIColor(red: 0x2C/255.0, green: 0x2C/255.0, blue: 0x2E/255.0, alpha: 1.0) + + gradientLayer.colors = [topColor.cgColor, bottomColor.cgColor] + gradientLayer.locations = [0.0, 1.0] + gradientLayer.startPoint = CGPoint(x: 0.5, y: 0.0) + gradientLayer.endPoint = CGPoint(x: 0.5, y: 1.0) + backgroundImageView.layer.insertSublayer(gradientLayer, at: 0) pageControl.numberOfPages = LoginIntro.allCases.count pageControl.currentPage = 0 @@ -292,3 +305,4 @@ extension LoginViewController: UICollectionViewDataSource, UICollectionViewDeleg } } } + diff --git a/Atcha-iOS/Presentation/Onboarding/Permission/PermissionViewController.swift b/Atcha-iOS/Presentation/Onboarding/Permission/PermissionViewController.swift index 3e2db110..2c2e3b7b 100644 --- a/Atcha-iOS/Presentation/Onboarding/Permission/PermissionViewController.swift +++ b/Atcha-iOS/Presentation/Onboarding/Permission/PermissionViewController.swift @@ -227,7 +227,10 @@ final class PermissionViewController: BaseViewController { UIApplication.shared.open(url) }) - present(alert, animated: true) + // 권한 팝업 직후 안전하게 다음 런루프에 표시 + DispatchQueue.main.async { [weak self] in + self?.present(alert, animated: true) + } } private func presentPushDeniedAlert() { @@ -289,8 +292,13 @@ final class PermissionViewController: BaseViewController { extension PermissionViewController { @objc private func handleRegiTap() { - dimView.alpha = 0 - dismiss(animated: true) + // 컨테이너만 숨기고(시트는 유지), 뒤 화면 터치 방지 위해 dim은 유지 + button.isEnabled = false + containerView.isUserInteractionEnabled = false + UIView.animate(withDuration: 0.2) { + self.containerView.alpha = 0 + } + viewModel.startPermissionFlow() AmplitudeManager.shared.track(.permission_setting) AmplitudeManager.shared.timerStart("signup_dwell") diff --git a/Atcha-iOS/Presentation/Onboarding/RegisterLocation/RegisterLocationViewController.swift b/Atcha-iOS/Presentation/Onboarding/RegisterLocation/RegisterLocationViewController.swift index a8c3fe00..6ed4f6dc 100644 --- a/Atcha-iOS/Presentation/Onboarding/RegisterLocation/RegisterLocationViewController.swift +++ b/Atcha-iOS/Presentation/Onboarding/RegisterLocation/RegisterLocationViewController.swift @@ -100,7 +100,7 @@ class RegisterLocationViewController: BaseViewController= 2.0.2, < 8.0) + artifactory (3.0.17) + atomos (0.1.3) + aws-eventstream (1.4.0) + aws-partitions (1.1216.0) + aws-sdk-core (3.242.0) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.992.0) + aws-sigv4 (~> 1.9) + base64 + bigdecimal + jmespath (~> 1, >= 1.6.1) + logger + aws-sdk-kms (1.122.0) + aws-sdk-core (~> 3, >= 3.241.4) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.213.0) + aws-sdk-core (~> 3, >= 3.241.4) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.12.1) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + base64 (0.2.0) + benchmark (0.5.0) + bigdecimal (4.0.1) + claide (1.1.0) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + csv (3.3.5) + declarative (0.0.20) + digest-crc (0.7.0) + rake (>= 12.0.0, < 14.0.0) + domain_name (0.6.20240107) + dotenv (2.8.1) + emoji_regex (3.2.3) + excon (0.112.0) + faraday (1.8.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + multipart-post (>= 1.2, < 3) + ruby2_keywords (>= 0.0.4) + faraday-cookie_jar (0.0.8) + faraday (>= 0.8.0) + http-cookie (>= 1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.1) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-net_http (1.0.2) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday_middleware (1.2.1) + faraday (~> 1.0) + fastimage (2.4.0) + fastlane (2.232.1) + CFPropertyList (>= 2.3, < 4.0.0) + abbrev (~> 0.1.2) + addressable (>= 2.8, < 3.0.0) + artifactory (~> 3.0) + aws-sdk-s3 (~> 1.197) + babosa (>= 1.0.3, < 2.0.0) + base64 (~> 0.2.0) + benchmark (>= 0.1.0) + bundler (>= 1.17.3, < 5.0.0) + colored (~> 1.2) + commander (~> 4.6) + csv (~> 3.3) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + fastlane-sirp (>= 1.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, <= 2.1.1) + google-cloud-storage (~> 1.31) + highline (~> 2.0) + http-cookie (~> 1.0.5) + json (< 3.0.0) + jwt (>= 2.1.0, < 3) + logger (>= 1.6, < 2.0) + mini_magick (>= 4.9.4, < 5.0.0) + multipart-post (>= 2.0.0, < 3.0.0) + mutex_m (~> 0.3.0) + naturally (~> 2.2) + nkf (~> 0.2.0) + optparse (>= 0.1.1, < 1.0.0) + ostruct (>= 0.1.0) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 2.0.0, < 3.0.0) + security (= 0.1.5) + simctl (~> 1.6.3) + terminal-notifier (>= 2.0.0, < 3.0.0) + terminal-table (~> 3) + tty-screen (>= 0.6.3, < 1.0.0) + tty-spinner (>= 0.8.0, < 1.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.4.1) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + fastlane-sirp (1.0.0) + sysrandom (~> 1.0) + gh_inspector (1.1.3) + google-apis-androidpublisher_v3 (0.96.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-core (0.18.0) + addressable (~> 2.5, >= 2.5.1) + googleauth (~> 1.9) + httpclient (>= 2.8.3, < 3.a) + mini_mime (~> 1.0) + mutex_m + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + google-apis-iamcredentials_v1 (0.26.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-playcustomapp_v1 (0.17.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-storage_v1 (0.60.0) + google-apis-core (>= 0.15.0, < 2.a) + google-cloud-core (1.8.0) + google-cloud-env (>= 1.0, < 3.a) + google-cloud-errors (~> 1.0) + google-cloud-env (2.1.1) + faraday (>= 1.0, < 3.a) + google-cloud-errors (1.5.0) + google-cloud-storage (1.58.0) + addressable (~> 2.8) + digest-crc (~> 0.4) + google-apis-core (>= 0.18, < 2) + google-apis-iamcredentials_v1 (~> 0.18) + google-apis-storage_v1 (>= 0.42) + google-cloud-core (~> 1.6) + googleauth (~> 1.9) + mini_mime (~> 1.0) + googleauth (1.11.2) + faraday (>= 1.0, < 3.a) + google-cloud-env (~> 2.1) + jwt (>= 1.4, < 3.0) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.8) + domain_name (~> 0.5) + httpclient (2.9.0) + mutex_m + jmespath (1.6.2) + json (2.18.1) + jwt (2.10.2) + base64 + logger (1.7.0) + mini_magick (4.13.2) + mini_mime (1.1.5) + multi_json (1.19.1) + multipart-post (2.4.1) + mutex_m (0.3.0) + nanaimo (0.4.0) + naturally (2.3.0) + nkf (0.2.0) + optparse (0.8.1) + os (1.1.4) + ostruct (0.6.3) + plist (3.7.2) + public_suffix (7.0.2) + rake (13.3.1) + representable (3.2.0) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) + retriable (3.2.1) + rexml (3.4.4) + rouge (3.28.0) + ruby2_keywords (0.0.5) + rubyzip (2.4.1) + security (0.1.5) + signet (0.21.0) + addressable (~> 2.8) + faraday (>= 0.17.5, < 3.a) + jwt (>= 1.5, < 4.0) + multi_json (~> 1.10) + simctl (1.6.10) + CFPropertyList + naturally + sysrandom (1.0.5) + terminal-notifier (2.0.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + trailblazer-option (0.1.2) + tty-cursor (0.7.1) + tty-screen (0.8.2) + tty-spinner (0.9.3) + tty-cursor (~> 0.7) + uber (0.1.0) + unicode-display_width (2.6.0) + word_wrap (1.0.0) + xcodeproj (1.27.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.4.0) + rexml (>= 3.3.6, < 4.0) + xcpretty (0.4.1) + rouge (~> 3.28.0) + xcpretty-travis-formatter (1.0.1) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + arm64-darwin-25 + ruby + +DEPENDENCIES + fastlane + +CHECKSUMS + CFPropertyList (3.0.8) sha256=2c99d0d980536d3d7ab252f7bd59ac8be50fbdd1ff487c98c949bb66bb114261 + abbrev (0.1.2) sha256=ad1b4eaaaed4cb722d5684d63949e4bde1d34f2a95e20db93aecfe7cbac74242 + addressable (2.8.8) sha256=7c13b8f9536cf6364c03b9d417c19986019e28f7c00ac8132da4eb0fe393b057 + artifactory (3.0.17) sha256=3023d5c964c31674090d655a516f38ca75665c15084140c08b7f2841131af263 + atomos (0.1.3) sha256=7d43b22f2454a36bace5532d30785b06de3711399cb1c6bf932573eda536789f + aws-eventstream (1.4.0) sha256=116bf85c436200d1060811e6f5d2d40c88f65448f2125bc77ffce5121e6e183b + aws-partitions (1.1216.0) sha256=86bd1ef7533caa4574578c9d8050531d58713553e560a9fd649fce0a60542da6 + aws-sdk-core (3.242.0) sha256=c17b3003acc78d80c1a8437b285a1cfc5e4d7749ce7821cf3071e847535a29a0 + aws-sdk-kms (1.122.0) sha256=47ce3f51b26bd7d76f1270cfdfca17b40073ecd3219c8c9400788712abfb4eb8 + aws-sdk-s3 (1.213.0) sha256=af596ccf544582406db610e95cc9099276eaf03142f57a2f30f76940e598e50d + aws-sigv4 (1.12.1) sha256=6973ff95cb0fd0dc58ba26e90e9510a2219525d07620c8babeb70ef831826c00 + babosa (1.0.4) sha256=18dea450f595462ed7cb80595abd76b2e535db8c91b350f6c4b3d73986c5bc99 + base64 (0.2.0) sha256=0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507 + benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c + bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7 + claide (1.1.0) sha256=6d3c5c089dde904d96aa30e73306d0d4bd444b1accb9b3125ce14a3c0183f82e + colored (1.2) sha256=9d82b47ac589ce7f6cab64b1f194a2009e9fd00c326a5357321f44afab2c1d2c + colored2 (3.1.2) sha256=b13c2bd7eeae2cf7356a62501d398e72fde78780bd26aec6a979578293c28b4a + commander (4.6.0) sha256=7d1ddc3fccae60cc906b4131b916107e2ef0108858f485fdda30610c0f2913d9 + csv (3.3.5) sha256=6e5134ac3383ef728b7f02725d9872934f523cb40b961479f69cf3afa6c8e73f + declarative (0.0.20) sha256=8021dd6cb17ab2b61233c56903d3f5a259c5cf43c80ff332d447d395b17d9ff9 + digest-crc (0.7.0) sha256=64adc23a26a241044cbe6732477ca1b3c281d79e2240bcff275a37a5a0d78c07 + domain_name (0.6.20240107) sha256=5f693b2215708476517479bf2b3802e49068ad82167bcd2286f899536a17d933 + dotenv (2.8.1) sha256=c5944793349ae03c432e1780a2ca929d60b88c7d14d52d630db0508c3a8a17d8 + emoji_regex (3.2.3) sha256=ecd8be856b7691406c6bf3bb3a5e55d6ed683ffab98b4aa531bb90e1ddcc564b + excon (0.112.0) sha256=daf9ac3a4c2fc9aa48383a33da77ecb44fa395111e973084d5c52f6f214ae0f0 + faraday (1.8.0) sha256=d1fb776cf25973b7f52a82b625bb0a009fe30ad6021ef838fb9109bf1ea6d029 + faraday-cookie_jar (0.0.8) sha256=0140605823f8cc63c7028fccee486aaed8e54835c360cffc1f7c8c07c4299dbb + faraday-em_http (1.0.0) sha256=7a3d4c7079789121054f57e08cd4ef7e40ad1549b63101f38c7093a9d6c59689 + faraday-em_synchrony (1.0.1) sha256=bf3ce45dcf543088d319ab051f80985ea6d294930635b7a0b966563179f81750 + faraday-excon (1.1.0) sha256=b055c842376734d7f74350fe8611542ae2000c5387348d9ba9708109d6e40940 + faraday-httpclient (1.0.1) sha256=4c8ff1f0973ff835be8d043ef16aaf54f47f25b7578f6d916deee8399a04d33b + faraday-net_http (1.0.2) sha256=63992efea42c925a20818cf3c0830947948541fdcf345842755510d266e4c682 + faraday-net_http_persistent (1.2.0) sha256=0b0cbc8f03dab943c3e1cc58d8b7beb142d9df068b39c718cd83e39260348335 + faraday-patron (1.0.0) sha256=dc2cd7b340bb3cc8e36bcb9e6e7eff43d134b6d526d5f3429c7a7680ddd38fa7 + faraday-rack (1.0.0) sha256=ef60ec969a2bb95b8dbf24400155aee64a00fc8ba6c6a4d3968562bcc92328c0 + faraday_middleware (1.2.1) sha256=d45b78c8ee864c4783fbc276f845243d4a7918a67301c052647bacabec0529e9 + fastimage (2.4.0) sha256=5fce375e27d3bdbb46c18dbca6ba9af29d3304801ae1eb995771c4796c5ac7e8 + fastlane (2.232.1) sha256=5b768d7a515332bea357ec836425e389b931a8cce64a6c31bcdd67353df8c25a + fastlane-sirp (1.0.0) sha256=66478f25bcd039ec02ccf65625373fca29646fa73d655eb533c915f106c5e641 + gh_inspector (1.1.3) sha256=04cca7171b87164e053aa43147971d3b7f500fcb58177698886b48a9fc4a1939 + google-apis-androidpublisher_v3 (0.96.0) sha256=9e27b03295fdd2c4a67b5e4d11f891492c89f73beff4a3f9323419165a56d01c + google-apis-core (0.18.0) sha256=96b057816feeeab448139ed5b5c78eab7fc2a9d8958f0fbc8217dedffad054ee + google-apis-iamcredentials_v1 (0.26.0) sha256=3ff70a10a1d6cddf2554e95b7c5df2c26afdeaeb64100048a355194da19e48a3 + google-apis-playcustomapp_v1 (0.17.0) sha256=d5bc90b705f3f862bab4998086449b0abe704ee1685a84821daa90ca7fa95a78 + google-apis-storage_v1 (0.60.0) sha256=ad2511b7128344248c2a16adb56ad4b1b48f37d53925455b7b77acccfe75367a + google-cloud-core (1.8.0) sha256=e572edcbf189cfcab16590628a516cec3f4f63454b730e59f0b36575120281cf + google-cloud-env (2.1.1) sha256=cf4bb8c7d517ee1ea692baedf06e0b56ce68007549d8d5a66481aa9f97f46999 + google-cloud-errors (1.5.0) sha256=b56be28b8c10628125214dde571b925cfcebdbc58619e598250c37a2114f7b4b + google-cloud-storage (1.58.0) sha256=1bedc07a9c75af169e1ede1dd306b9f941f9ffa9e7095d0364c0803c468fdffd + googleauth (1.11.2) sha256=7e6bacaeed7aea3dd66dcea985266839816af6633e9f5983c3c2e0e40a44731e + highline (2.0.3) sha256=2ddd5c127d4692721486f91737307236fe005352d12a4202e26c48614f719479 + http-cookie (1.0.8) sha256=b14fe0445cf24bf9ae098633e9b8d42e4c07c3c1f700672b09fbfe32ffd41aa6 + httpclient (2.9.0) sha256=4b645958e494b2f86c2f8a2f304c959baa273a310e77a2931ddb986d83e498c8 + jmespath (1.6.2) sha256=238d774a58723d6c090494c8879b5e9918c19485f7e840f2c1c7532cf84ebcb1 + json (2.18.1) sha256=fe112755501b8d0466b5ada6cf50c8c3f41e897fa128ac5d263ec09eedc9f986 + jwt (2.10.2) sha256=31e1ee46f7359883d5e622446969fe9c118c3da87a0b1dca765ce269c3a0c4f4 + logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 + mini_magick (4.13.2) sha256=71d6258e0e8a3d04a9a0a09784d5d857b403a198a51dd4f882510435eb95ddd9 + mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef + multi_json (1.19.1) sha256=7aefeff8f2c854bf739931a238e4aea64592845e0c0395c8a7d2eea7fdd631b7 + multipart-post (2.4.1) sha256=9872d03a8e552020ca096adadbf5e3cb1cd1cdd6acd3c161136b8a5737cdb4a8 + mutex_m (0.3.0) sha256=cfcb04ac16b69c4813777022fdceda24e9f798e48092a2b817eb4c0a782b0751 + nanaimo (0.4.0) sha256=faf069551bab17f15169c1f74a1c73c220657e71b6e900919897a10d991d0723 + naturally (2.3.0) sha256=459923cf76c2e6613048301742363200c3c7e4904c324097d54a67401e179e01 + nkf (0.2.0) sha256=fbc151bda025451f627fafdfcb3f4f13d0b22ae11f58c6d3a2939c76c5f5f126 + optparse (0.8.1) sha256=42bea10d53907ccff4f080a69991441d611fbf8733b60ed1ce9ee365ce03bd1a + os (1.1.4) sha256=57816d6a334e7bd6aed048f4b0308226c5fb027433b67d90a9ab435f35108d3f + ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912 + plist (3.7.2) sha256=d37a4527cc1116064393df4b40e1dbbc94c65fa9ca2eec52edf9a13616718a42 + public_suffix (7.0.2) sha256=9114090c8e4e7135c1fd0e7acfea33afaab38101884320c65aaa0ffb8e26a857 + rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c + representable (3.2.0) sha256=cc29bf7eebc31653586849371a43ffe36c60b54b0a6365b5f7d95ec34d1ebace + retriable (3.2.1) sha256=26e87a33391fae4c382d4750f1e135e4dda7e5aa32b6b71f1992265981f9b991 + rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142 + rouge (3.28.0) sha256=0d6de482c7624000d92697772ab14e48dca35629f8ddf3f4b21c99183fd70e20 + ruby2_keywords (0.0.5) sha256=ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef + rubyzip (2.4.1) sha256=8577c88edc1fde8935eb91064c5cb1aef9ad5494b940cf19c775ee833e075615 + security (0.1.5) sha256=3a977a0eca7706e804c96db0dd9619e0a94969fe3aac9680fcfc2bf9b8a833b7 + signet (0.21.0) sha256=d617e9fbf24928280d39dcfefba9a0372d1c38187ffffd0a9283957a10a8cd5b + simctl (1.6.10) sha256=b99077f4d13ad81eace9f86bf5ba4df1b0b893a4d1b368bd3ed59b5b27f9236b + sysrandom (1.0.5) sha256=5ac1ac3c2ec64ef76ac91018059f541b7e8f437fbda1ccddb4f2c56a9ccf1e75 + terminal-notifier (2.0.0) sha256=7a0d2b2212ab9835c07f4b2e22a94cff64149dba1eed203c04835f7991078cea + terminal-table (3.0.2) sha256=f951b6af5f3e00203fb290a669e0a85c5dd5b051b3b023392ccfd67ba5abae91 + trailblazer-option (0.1.2) sha256=20e4f12ea4e1f718c8007e7944ca21a329eee4eed9e0fa5dde6e8ad8ac4344a3 + tty-cursor (0.7.1) sha256=79534185e6a777888d88628b14b6a1fdf5154a603f285f80b1753e1908e0bf48 + tty-screen (0.8.2) sha256=c090652115beae764336c28802d633f204fb84da93c6a968aa5d8e319e819b50 + tty-spinner (0.9.3) sha256=0e036f047b4ffb61f2aa45f5a770ec00b4d04130531558a94bfc5b192b570542 + uber (0.1.0) sha256=5beeb407ff807b5db994f82fa9ee07cfceaa561dad8af20be880bc67eba935dc + unicode-display_width (2.6.0) sha256=12279874bba6d5e4d2728cef814b19197dbb10d7a7837a869bab65da943b7f5a + word_wrap (1.0.0) sha256=f556d4224c812e371000f12a6ee8102e0daa724a314c3f246afaad76d82accc7 + xcodeproj (1.27.0) sha256=8cc7a73b4505c227deab044dce118ede787041c702bc47636856a2e566f854d3 + xcpretty (0.4.1) sha256=b14c50e721f6589ee3d6f5353e2c2cfcd8541fa1ea16d6c602807dd7327f3892 + xcpretty-travis-formatter (1.0.1) sha256=aacc332f17cb7b2cba222994e2adc74223db88724fe76341483ad3098e232f93 + +BUNDLED WITH + 4.0.3 diff --git a/fastlane/Appfile b/fastlane/Appfile new file mode 100644 index 00000000..c79b56bd --- /dev/null +++ b/fastlane/Appfile @@ -0,0 +1,7 @@ +app_identifier("com.atcha.iOS") # The bundle identifier of your app +apple_id("wodnd0418@gmail.com") # Your Apple Developer Portal username + +itc_team_id("126996225") # App Store Connect Team ID + +# For more information about the Appfile, see: +# https://docs.fastlane.tools/advanced/#appfile diff --git a/fastlane/Fastfile b/fastlane/Fastfile new file mode 100644 index 00000000..1a76dcca --- /dev/null +++ b/fastlane/Fastfile @@ -0,0 +1,94 @@ +# This file contains the fastlane.tools configuration +# You can find the documentation at https://docs.fastlane.tools +# +# For a list of all available actions, check out +# +# https://docs.fastlane.tools/actions +# +# For a list of all available plugins, check out +# +# https://docs.fastlane.tools/plugins/available-plugins +# + +# Uncomment the line if you want fastlane to automatically update itself +# update_fastlane + +default_platform(:ios) + +platform :ios do + before_all do + setup_ci + end + + desc "TestFlight 업로드" + lane :beta do + api_key = app_store_connect_api_key( + key_id: ENV["ASC_KEY_ID"], + issuer_id: ENV["ASC_ISSUER_ID"], + key_content: ENV["ASC_KEY_CONTENT"], + is_key_content_base64: true + ) + + match(type: "appstore") + latest_build = latest_testflight_build_number(api_key: api_key) + + increment_build_number( + build_number: latest_build + 1, + xcodeproj: "Atcha-iOS.xcodeproj" + ) + + build_app( + project: "Atcha-iOS.xcodeproj", + scheme: "Atcha-Stage", + configuration: "Stage", + clean: true, + export_method: "app-store", + xcargs: "CODE_SIGN_STYLE=Manual PROVISIONING_PROFILE_SPECIFIER='match AppStore com.atcha.iOS'" + ) + + upload_to_testflight(api_key: api_key) + end + + desc "App Store 업로드 (Submit은 안 함)" + lane :release do + + api_key = app_store_connect_api_key( + key_id: ENV["ASC_KEY_ID"], + issuer_id: ENV["ASC_ISSUER_ID"], + key_content: ENV["ASC_KEY_CONTENT"], + is_key_content_base64: true + ) + + match(type: "appstore") + + latest_build = latest_testflight_build_number(api_key: api_key) + + increment_build_number( + build_number: latest_build + 1, + xcodeproj: "Atcha-iOS.xcodeproj" + ) + + build_app( + project: "Atcha-iOS.xcodeproj", + scheme: "Atcha-Live", + configuration: "Release", + clean: true + ) + + api_key = app_store_connect_api_key( + key_id: ENV["ASC_KEY_ID"], + issuer_id: ENV["ASC_ISSUER_ID"], + key_content: ENV["ASC_KEY_CONTENT"], + is_key_content_base64: true + ) + + deliver( + api_key: api_key, + skip_metadata: true, + skip_screenshots: true, + submit_for_review: false, + force: true, + run_precheck_before_submit: false + ) + end +end \ No newline at end of file diff --git a/fastlane/Matchfile b/fastlane/Matchfile new file mode 100644 index 00000000..f1770844 --- /dev/null +++ b/fastlane/Matchfile @@ -0,0 +1,13 @@ +git_url("https://github.com/Atcha-Project/Atcha-iOS-Certificates.git") + +storage_mode("git") + +type("appstore") # The default type, can be: appstore, adhoc, enterprise or development + +app_identifier(["com.atcha.iOS"]) +username("wodnd0418@gmail.com") # Your Apple Developer Portal username + +# For all available options run `fastlane match --help` +# Remove the # in the beginning of the line to enable the other options + +# The docs are available on https://docs.fastlane.tools/actions/match diff --git a/fastlane/README.md b/fastlane/README.md new file mode 100644 index 00000000..526855b0 --- /dev/null +++ b/fastlane/README.md @@ -0,0 +1,40 @@ +fastlane documentation +---- + +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +```sh +xcode-select --install +``` + +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) + +# Available Actions + +## iOS + +### ios beta + +```sh +[bundle exec] fastlane ios beta +``` + +TestFlight 업로드 + +### ios release + +```sh +[bundle exec] fastlane ios release +``` + +App Store 업로드 (Submit은 안 함) + +---- + +This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. + +More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). + +The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).