How to leave a message in a crash report

时间:2016-10-20 19:10:50

标签: swift crash-reports

Im using the automatic crash reports that I receive via xcode. And I want to leave traps like this: fatalerror("here is the problem") but the message is not getting to the crash report, just trap.

Is there another way?

2 个答案:

答案 0 :(得分:1)

No I don´t think that it´s possible to do that, you have your debug/system log but that is just logged to your console.

答案 1 :(得分:1)

First: If you know why something could be broken in your code, you should recover from it and not crash :)

Second: Apple's crash reporting should probably be considered a last ditch effort in case something goes horribly wrong or if the bare minimum is acceptable. If you want good crash/analytics reporting you will want to use a 3rd party solution like fabric or flurry.