Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/appstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/testflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
9 changes: 3 additions & 6 deletions Application/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Comment thread
opficdev marked this conversation as resolved.
"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",
]
)
),
Expand Down
6 changes: 6 additions & 0 deletions Application/App/Sources/Resource/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
<false/>
<key>FirebaseAutomaticScreenReportingEnabled</key>
<false/>
<key>FirebaseCrashlyticsCollectionEnabled</key>
#if CRASHLYTICS_COLLECTION_ENABLED
<true/>
#else
<false/>
#endif
Comment thread
opficdev marked this conversation as resolved.
<key>FIRESTORE_DATABASE_ID</key>
<string>$(FIRESTORE_DATABASE_ID)</string>
<key>FUNCTION_API_BASE_URL</key>
Expand Down
10 changes: 0 additions & 10 deletions Application/Infra/Sources/Service/FirebaseAppServiceImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Data
import FirebaseCrashlytics
import FirebaseCore

final class FirebaseAppServiceImpl: FirebaseAppService {
Expand All @@ -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
}
}
9 changes: 0 additions & 9 deletions Application/Presentation/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
)

Expand Down
1 change: 1 addition & 0 deletions Tuist/ProjectDescriptionHelpers/Project+Settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 0 additions & 9 deletions Tuist/ProjectDescriptionHelpers/Project+Templates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
)
),
Expand Down
15 changes: 14 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Comment thread
opficdev marked this conversation as resolved.
)

ipa_output_path = lane_context[SharedValues::IPA_OUTPUT_PATH].to_s
Expand Down
Loading