You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/knowledge-firebase/firebase-crashlytics-dsym-uploading.md
+62-50Lines changed: 62 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,52 +13,64 @@ A sample project for uploading **dSYM** files to Firebase Crashlytics can be fou
13
13
14
14
### How to upload dSYM artifacts to Firebase Crashlytics using codemagic.yaml
15
15
16
-
In order to generate debug symbols, Firebase Crashlytics must be installed using the following script in your `codemagic.yaml`:
16
+
Flutter automatically generates the app’s dSYM file when building an iOS archive with:
17
17
18
18
{{< highlight yaml "style=paraiso-dark">}}
19
-
scripts:
20
-
- name: Install Firebase Crashlytics
21
-
script: |
22
-
flutter pub add firebase_crashlytics
19
+
flutter build ipa
23
20
{{< /highlight >}}
24
21
22
+
or
25
23
26
-
Alternatively, **firebase_crashlytics: ^2.5.2** could be added in the **pubspec.yaml** file under **dependencies**:
24
+
{{< highlight yaml "style=paraiso-dark">}}
25
+
flutter build ios --release
26
+
{{< /highlight >}}
27
+
28
+
Crashlytics must also be added to your app:
29
+
{{< highlight yaml "style=paraiso-dark">}}
30
+
flutter pub add firebase_crashlytics
31
+
32
+
{{< /highlight >}}
33
+
34
+
or by adding **firebase_crashlytics** dependency manually in the **pubspec.yaml** file:
27
35
28
36
{{< highlight yaml "style=paraiso-dark">}}
29
37
dependencies:
30
38
flutter:
31
39
sdk: flutter
32
-
firebase_crashlytics: ^2.5.2
40
+
firebase_crashlytics: ^latest
33
41
{{< /highlight >}}
34
42
35
43
36
44
As soon as your build finishes successfully, debug symbols are generated. However, if you want them to be displayed in the Codemagic UI on the build page, then the following path needs to be configured in `codemagic.yaml` under the artifacts section:
**Note:** The sample path uses `Runner.xcarchive` because Flutter iOS projects use `Runner` as the default app target.
72
+
If your project was renamed or you manually changed the iOS target name, make sure to update the path accordingly.
73
+
{{</notebox>}}
62
74
63
75
The above-mentioned **dsymPath** is Flutter specific and it could change depending on what platform the app is built on. For example, in React Native or Native iOS applications you might use the dsymPath as:
64
76
@@ -83,41 +95,41 @@ If necessary, you can use remote access to the build machine to find the correct
83
95
For Native iOS apps, in the case of using SwiftPackageManager (SPM) instead of CocoaPods, the following script needs to be added in a post-publishing script:
84
96
85
97
{{< highlight yaml "style=paraiso-dark">}}
86
-
publishing:
87
-
scripts:
88
-
- name: Upload debug symbols to Firebase Crashlytics
89
-
script: |
90
-
echo "Find build artifacts"
91
-
dsymPath=$(find build/ios/xcarchive/* | head -1)
92
-
echo "dsyms expected in:"
93
-
ls -d -- $dsymPath/dSYMs/*
94
-
dsymFile=$(find $dsymPath/dSYMs -name "*.dSYM" | head -1)
95
-
if [[ -z ${dsymFile} ]]
96
-
then
97
-
echo "No debug symbols were found, skip publishing to Firebase Crashlytics"
98
-
else
99
-
echo "Publishing debug symbols in $dsymFile to Firebase Crashlytics"
0 commit comments