@@ -83,6 +83,8 @@ platform :ios do
8383 build_number = ( latest_release &.dig ( :buildVersion ) || 0 ) . to_i + 1
8484 build_ipa ( export_method : "ad-hoc" , build_number : build_number )
8585
86+ upload_dsyms_to_crashlytics
87+
8688 firebase_app_distribution (
8789 app : app_id ,
8890 ipa_path : "#{ root_path } /build/ios/ipa/ChatSample.ipa" ,
@@ -105,6 +107,8 @@ platform :ios do
105107 build_number = ( current_build_number || 0 ) . to_i + 1
106108 build_ipa ( export_method : "app-store" , build_number : build_number )
107109
110+ upload_dsyms_to_crashlytics
111+
108112 upload_to_testflight (
109113 api_key : appstore_api_key ,
110114 distribute_external : true ,
@@ -116,6 +120,19 @@ platform :ios do
116120 )
117121 end
118122
123+ desc "Upload iOS dSYMs from the most recent `flutter build ipa` to Firebase Crashlytics"
124+ private_lane :upload_dsyms_to_crashlytics do
125+ dsym_zip = zip (
126+ path : "#{ root_path } /build/ios/archive/Runner.xcarchive/dSYMs"
127+ )
128+
129+ upload_symbols_to_crashlytics (
130+ dsym_path : dsym_zip ,
131+ gsp_path : "#{ root_path } /ios/Runner/GoogleService-Info.plist" ,
132+ binary_path : "#{ root_path } /ios/Pods/FirebaseCrashlytics/upload-symbols"
133+ )
134+ end
135+
119136 private_lane :appstore_api_key do
120137 @appstore_api_key ||= app_store_connect_api_key (
121138 key_id : 'MT3PRT8TB7' ,
0 commit comments