Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发生崩溃后的处理? #17

Closed
monsterLin opened this issue Aug 31, 2019 · 7 comments
Closed

发生崩溃后的处理? #17

monsterLin opened this issue Aug 31, 2019 · 7 comments
Labels
discussion Discussion that it not necessarily related to a concrete bug or feature

Comments

@monsterLin
Copy link

请问,发生崩溃后如何在合适的时机去上传这些崩溃的文件到服务端?

@caikelun
Copy link
Collaborator

caikelun commented Sep 2, 2019

我个人建议的策略是:

  1. app启动后10秒,开始逐个上传tombstones目录下的崩溃文件,上传成功一个删除一个。
  2. app启动后10秒内发生的崩溃,在callback中立刻尝试投递,投递成功则删除。

@caikelun caikelun added the discussion Discussion that it not necessarily related to a concrete bug or feature label Sep 2, 2019
@monsterLin
Copy link
Author

你说的callback是实现xcrash.ICrashCallback这个嘛?

@caikelun
Copy link
Collaborator

caikelun commented Sep 2, 2019

是的

@monsterLin
Copy link
Author

xcrash.ICrashCallback 是发生崩溃后的回调么?我这边测试了下崩溃后这个方法不会有回调的呀?

@monsterLin
Copy link
Author

monsterLin commented Sep 2, 2019

还是下,是下次启动后这个方法才会有回调的?

@caikelun
Copy link
Collaborator

caikelun commented Sep 2, 2019

你可以看下源码中的sample app,里面有callback使用的例子。

@monsterLin
Copy link
Author

OK,谢啦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion that it not necessarily related to a concrete bug or feature
Projects
None yet
Development

No branches or pull requests

2 participants