Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
303 views
in Technique[技术] by (71.8m points)

ios - Crashlytics does not show crashes

I have just installed Crashlitycs using this official instruction.

I have set Debug Information Format is “DWARF with dSYM File” for both Debug and Release and disabled Bitcode (some people wrote that it could help):

enter image description here

AppDelegate:

Fabric.sharedSDK().debug = true
Fabric.with([Crashlytics.self])

To simulate a crash I use

Crashlytics.sharedInstance().crash()

and

var ggg: Int!
print(ggg)

Crashlitics collects some information about sessions. For example it updates bundle versions info:

enter image description here

So connection with Crashlitics works. However crash information is empty:

enter image description here

I am using XCode 8 and iOS 9/10. What I am doing wrong?

EDIT:

I have tested it on simulator and device without XCode debugger connection (i.e. launching from sumulator/device screen)

Finally I have received some Crashlytics reports after 7-8 hours after crashes. I expected them earlier because according to documentation:

Within a few minutes, you should see the crash appear on your Fabric Dashboard.

However I did not receive all crashes I was waiting for. During my experiments I have tried different ways to initialise Crashlytics:

Fabric.with([Crashlytics.self])
and
Fabric.with([Crashlytics.self()])

Could it be the reason? I have also found the similar unanswered question.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Checked the following terms,

  1. Make sure Crashlytics SDK line is after all other 3rd-party SDK lines. (it needs to be last one called in your appDidFinishLaunching method.)

  2. Force a crash and then relaunch the app. Xcode must be disconnected to stop it from intercepting the crash report. To disconnect Xcode, follow the instructions here.

  3. If you're using [Crashlytics sharedInstance] crash]; to test crashing, make sure it's not in the appDidFinishLaunching method.

These are already mentioned in support section, Here is additional ones -

  1. Check in organization -> Your App -> Missing dSYM, Is it showing any missing dSYM file

enter image description here

if yes, Then do the following step

  1. Right Click on your archive -> Show in Finder -> Right click on file and click on Show package contents
  2. Right click on dSYM file - > Show package contents -> Contents -> Resources -> DWARF (Open in terminal)
  3. Run command dwarfdump --uuid "file name you saw there in dwarf folder"

enter image description here

This will show all the associated UUID, And if any listed UUID matched with the one mentioned in missing dSYM id then just compress the dSYM folder and upload it on crashlytics Missing dSYM segment.

This step is important cause sometimes the dSYM file we extract from organizer doesn't contain correct UUID. And after uploading the wrong one we wait for its updations. So it's better to make sure you are uploading the right dSYM file.

Other than aforementioned things, Bitcode property and Debug Information Format in Build Settings also affect the crash reporting.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...