How to send email when an app crashes on the iphone?

前端 未结 3 1112
有刺的猬
有刺的猬 2021-02-11 02:25

I was using an app the other day that crashed, but as it crashed also asked to send an email with the crash info.

Does anyone know how this is done?

Perhaps it w

相关标签:
3条回答
  • 2021-02-11 02:32

    PLCrashReporter attempts to provide a framework to do exactly this. Not used it myself yet but considering it.

    0 讨论(0)
  • 2021-02-11 02:36

    There seems to be this hook available just before the app shuts down:

    NSSetUncaughtExceptionHandler()
    

    Sets the top-level error-handling function where you can perform last-minute logging before the program terminates.

    0 讨论(0)
  • 2021-02-11 02:49

    You basically wrap your entire application in a try/catch and if you catch an error you can offer to phone home with the details.

    0 讨论(0)
提交回复
热议问题