From bbcc8cb41d0a2d7df1a4c71b85a4c593754c9d50 Mon Sep 17 00:00:00 2001 From: opficdev Date: Sun, 12 Jul 2026 17:15:45 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20Xcode=20=EC=A7=81=EC=A0=91=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=EC=9D=98=20Crashlytics=20=EC=88=98=EC=A7=91?= =?UTF-8?q?=20=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/App/Project.swift | 9 +++------ Application/App/Sources/Resource/Info.plist | 6 ++++++ .../Infra/Sources/Service/FirebaseAppServiceImpl.swift | 10 ---------- Application/Presentation/Project.swift | 9 --------- Tuist/ProjectDescriptionHelpers/Project+Settings.swift | 1 + .../ProjectDescriptionHelpers/Project+Templates.swift | 9 --------- 6 files changed, 10 insertions(+), 34 deletions(-) diff --git a/Application/App/Project.swift b/Application/App/Project.swift index db67b630..9c305624 100644 --- a/Application/App/Project.swift +++ b/Application/App/Project.swift @@ -46,26 +46,23 @@ let project = Project( base: [ "ASSETCATALOG_COMPILER_APPICON_NAME": "AppIcon", "CODE_SIGN_STYLE": "Automatic", + "CRASHLYTICS_COLLECTION_ENABLED": "0", "ENABLE_USER_SCRIPT_SANDBOXING": "NO", + "INFOPLIST_PREPROCESS": "YES", + "INFOPLIST_PREPROCESSOR_DEFINITIONS": "$(inherited) CRASHLYTICS_COLLECTION_ENABLED=$(CRASHLYTICS_COLLECTION_ENABLED)", "PRODUCT_MODULE_NAME": "App", ], debug: [ "APS_ENVIRONMENT": "development", - "DEBUG_INFORMATION_FORMAT": "dwarf", "FIRESTORE_DATABASE_ID": "staging", - "INFOPLIST_KEY_FirebaseCrashlyticsCollectionEnabled": "NO", ], staging: [ "APS_ENVIRONMENT": "production", - "DEBUG_INFORMATION_FORMAT": "dwarf-with-dsym", "FIRESTORE_DATABASE_ID": "staging", - "INFOPLIST_KEY_FirebaseCrashlyticsCollectionEnabled": "YES", ], release: [ "APS_ENVIRONMENT": "production", - "DEBUG_INFORMATION_FORMAT": "dwarf-with-dsym", "FIRESTORE_DATABASE_ID": "prod", - "INFOPLIST_KEY_FirebaseCrashlyticsCollectionEnabled": "YES", ] ) ), diff --git a/Application/App/Sources/Resource/Info.plist b/Application/App/Sources/Resource/Info.plist index 27a437a2..84f1d58e 100644 --- a/Application/App/Sources/Resource/Info.plist +++ b/Application/App/Sources/Resource/Info.plist @@ -38,6 +38,12 @@ FirebaseAutomaticScreenReportingEnabled + FirebaseCrashlyticsCollectionEnabled +#if CRASHLYTICS_COLLECTION_ENABLED + +#else + +#endif FIRESTORE_DATABASE_ID $(FIRESTORE_DATABASE_ID) FUNCTION_API_BASE_URL diff --git a/Application/Infra/Sources/Service/FirebaseAppServiceImpl.swift b/Application/Infra/Sources/Service/FirebaseAppServiceImpl.swift index 3bb0473a..59e3f5b0 100644 --- a/Application/Infra/Sources/Service/FirebaseAppServiceImpl.swift +++ b/Application/Infra/Sources/Service/FirebaseAppServiceImpl.swift @@ -6,7 +6,6 @@ // import Data -import FirebaseCrashlytics import FirebaseCore final class FirebaseAppServiceImpl: FirebaseAppService { @@ -16,15 +15,6 @@ final class FirebaseAppServiceImpl: FirebaseAppService { guard !Self.isConfigured else { return } FirebaseApp.configure() - enableCrashlyticsCollectionIfNeeded() Self.isConfigured = true } } - -private extension FirebaseAppServiceImpl { - func enableCrashlyticsCollectionIfNeeded() { - #if !DEBUG - Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true) - #endif - } -} diff --git a/Application/Presentation/Project.swift b/Application/Presentation/Project.swift index fe45b5c8..7ae67a27 100644 --- a/Application/Presentation/Project.swift +++ b/Application/Presentation/Project.swift @@ -10,15 +10,6 @@ let frameworkBuildSettings = Settings.devlog( base: [ "ENABLE_USER_SCRIPT_SANDBOXING": "NO", "OTHER_LIBTOOLFLAGS": "$(inherited) -no_warning_for_no_symbols" - ], - debug: [ - "DEBUG_INFORMATION_FORMAT": "dwarf" - ], - staging: [ - "DEBUG_INFORMATION_FORMAT": "dwarf-with-dsym" - ], - release: [ - "DEBUG_INFORMATION_FORMAT": "dwarf-with-dsym" ] ) diff --git a/Tuist/ProjectDescriptionHelpers/Project+Settings.swift b/Tuist/ProjectDescriptionHelpers/Project+Settings.swift index cd1f054b..67181902 100644 --- a/Tuist/ProjectDescriptionHelpers/Project+Settings.swift +++ b/Tuist/ProjectDescriptionHelpers/Project+Settings.swift @@ -15,6 +15,7 @@ public extension Settings { ) -> Settings { var commonBase: SettingsDictionary = [ "CURRENT_PROJECT_VERSION": "1", + "DEBUG_INFORMATION_FORMAT": "dwarf", "INFOPLIST_KEY_CFBundleShortVersionString": "$(MARKETING_VERSION)", "INFOPLIST_KEY_CFBundleVersion": "$(CURRENT_PROJECT_VERSION)", "SWIFT_VERSION": "5.0", diff --git a/Tuist/ProjectDescriptionHelpers/Project+Templates.swift b/Tuist/ProjectDescriptionHelpers/Project+Templates.swift index d5470197..f6a53760 100644 --- a/Tuist/ProjectDescriptionHelpers/Project+Templates.swift +++ b/Tuist/ProjectDescriptionHelpers/Project+Templates.swift @@ -30,15 +30,6 @@ public extension Project { versionXcconfigPath: versionXcconfigPath, base: [ "ENABLE_USER_SCRIPT_SANDBOXING": "NO", - ], - debug: [ - "DEBUG_INFORMATION_FORMAT": "dwarf", - ], - staging: [ - "DEBUG_INFORMATION_FORMAT": "dwarf-with-dsym", - ], - release: [ - "DEBUG_INFORMATION_FORMAT": "dwarf-with-dsym", ] ) ), From a3d1744093fdd89ed8c20180827ee2d9c3ef7746 Mon Sep 17 00:00:00 2001 From: opficdev Date: Sun, 12 Jul 2026 17:20:52 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=EB=B0=B0=ED=8F=AC=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=EC=9D=98=20Crashlytics=EC=99=80=20dSYM=20=ED=99=9C?= =?UTF-8?q?=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 45905cb6..c9061927 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -142,6 +142,19 @@ platform :ios do end UI.message("Verified FUNCTION_API_BASE_URL=#{actual_function_api_base_url}") + + actual_crashlytics_collection_enabled = sh( + "/usr/libexec/PlistBuddy -c 'Print :FirebaseCrashlyticsCollectionEnabled' #{Shellwords.escape(plist_path)}", + log: false + ).strip + + if actual_crashlytics_collection_enabled != "true" + UI.user_error!( + "Unexpected FirebaseCrashlyticsCollectionEnabled: expected true, got #{actual_crashlytics_collection_enabled}" + ) + end + + UI.message("Verified FirebaseCrashlyticsCollectionEnabled=#{actual_crashlytics_collection_enabled}") end end @@ -240,7 +253,7 @@ platform :ios do output_directory: output_directory, output_name: "#{APP_PRODUCT_NAME}.ipa", include_symbols: true, - xcargs: "-skipPackagePluginValidation -skipMacroValidation" + xcargs: "CRASHLYTICS_COLLECTION_ENABLED=1 DEBUG_INFORMATION_FORMAT=dwarf-with-dsym -skipPackagePluginValidation -skipMacroValidation" ) ipa_output_path = lane_context[SharedValues::IPA_OUTPUT_PATH].to_s From 7c1658d1d3a4e418227e04defab703abd2261651 Mon Sep 17 00:00:00 2001 From: opficdev Date: Sun, 12 Jul 2026 17:21:07 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20=EB=B0=B0=ED=8F=AC=20dSYM=20UUID?= =?UTF-8?q?=20=EB=AA=A9=EB=A1=9D=20=EC=95=84=ED=8B=B0=ED=8C=A9=ED=8A=B8=20?= =?UTF-8?q?=EB=B3=B4=EC=A1=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/appstore.yml | 18 +++++++++++++++++- .github/workflows/testflight.yml | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/appstore.yml b/.github/workflows/appstore.yml index 45aa1ef8..9a156c53 100644 --- a/.github/workflows/appstore.yml +++ b/.github/workflows/appstore.yml @@ -109,6 +109,8 @@ jobs: google_service_info_path="Application/App/Sources/Resource/GoogleService-Info.plist" dsym_zip_path="$(find fastlane/appstore_build -maxdepth 1 -name '*.dSYM.zip' -print -quit)" + dsym_manifest_path="fastlane/appstore_build/dsym-uuids.txt" + dsym_extract_path="$RUNNER_TEMP/appstore-dsym" upload_symbols_path="$(find "$HOME/Library/Developer/Xcode/DerivedData" "$HOME/Library/Developer/Xcode/SourcePackages" "$GITHUB_WORKSPACE" -path '*/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/upload-symbols' -type f -print -quit 2>/dev/null || true)" if [ ! -f "$google_service_info_path" ]; then @@ -126,6 +128,18 @@ jobs: exit 1 fi + mkdir -p "$dsym_extract_path" + unzip -q "$dsym_zip_path" -d "$dsym_extract_path" + + while IFS= read -r dsym_path; do + dwarfdump --uuid "$dsym_path" + done < <(find "$dsym_extract_path" -type d -name '*.dSYM' | sort) | tee "$dsym_manifest_path" + + if [ ! -s "$dsym_manifest_path" ]; then + echo "Missing dSYM UUID manifest at $dsym_manifest_path" >&2 + exit 1 + fi + "$upload_symbols_path" -gsp "$google_service_info_path" -p ios "$dsym_zip_path" - name: Upload App Store build log @@ -141,7 +155,9 @@ jobs: uses: actions/upload-artifact@v6 with: name: appstore-dsym - path: fastlane/appstore_build/*.dSYM.zip + path: | + fastlane/appstore_build/*.dSYM.zip + fastlane/appstore_build/dsym-uuids.txt if-no-files-found: warn - name: Skip App Store Upload diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml index 43b23d26..af624833 100644 --- a/.github/workflows/testflight.yml +++ b/.github/workflows/testflight.yml @@ -110,6 +110,8 @@ jobs: google_service_info_path="Application/App/Sources/Resource/GoogleService-Info.plist" dsym_zip_path="$(find fastlane/testflight_build -maxdepth 1 -name '*.dSYM.zip' -print -quit)" + dsym_manifest_path="fastlane/testflight_build/dsym-uuids.txt" + dsym_extract_path="$RUNNER_TEMP/testflight-dsym" upload_symbols_path="$(find "$HOME/Library/Developer/Xcode/DerivedData" "$HOME/Library/Developer/Xcode/SourcePackages" "$GITHUB_WORKSPACE" -path '*/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/upload-symbols' -type f -print -quit 2>/dev/null || true)" if [ ! -f "$google_service_info_path" ]; then @@ -127,6 +129,18 @@ jobs: exit 1 fi + mkdir -p "$dsym_extract_path" + unzip -q "$dsym_zip_path" -d "$dsym_extract_path" + + while IFS= read -r dsym_path; do + dwarfdump --uuid "$dsym_path" + done < <(find "$dsym_extract_path" -type d -name '*.dSYM' | sort) | tee "$dsym_manifest_path" + + if [ ! -s "$dsym_manifest_path" ]; then + echo "Missing dSYM UUID manifest at $dsym_manifest_path" >&2 + exit 1 + fi + "$upload_symbols_path" -gsp "$google_service_info_path" -p ios "$dsym_zip_path" - name: Upload TestFlight build log @@ -142,7 +156,9 @@ jobs: uses: actions/upload-artifact@v6 with: name: testflight-dsym - path: fastlane/testflight_build/*.dSYM.zip + path: | + fastlane/testflight_build/*.dSYM.zip + fastlane/testflight_build/dsym-uuids.txt if-no-files-found: warn - name: Skip TestFlight Upload