As of Crashlytics 3.0.0, implementing a user prompt is the application's responsibility

大城市里の小女人 提交于 2019-12-10 21:31:35

问题


I am getting the following warning:

[Crashlytics:Crash] WARNING: the user prompt feature is enabled. As of Crashlytics 3.0.0, implementing a user prompt is the application's responsibility. See Crashlytics.h's notes about -crashlyticsDidDetectReportForLastExecution:completionHandler:

appearing in my app's log when I run it with Xcode. It looks like the version of Crashlytics I'm using is 3.0.8 (from the info.plist file in the Crashlytics.framework).

Here's the relevant doc from the Crashlytics.h file:

/**
 *
 * Called when a Crashlytics instance has determined that the last execution of the
 * application ended in a crash.  This is called synchronously on Crashlytics
 * initialization. Your delegate must invoke the completionHandler, but does not need to do so 
 * synchronously, or even on the main thread. Invoking completionHandler with NO will cause the
 * detected report to be deleted and not submitted to Crashlytics. This is useful for
 * implementing permission prompts, or other more-complex forms of logic around submitting crashes.
 *
 * Failure to invoke the completionHandler will prevent submissions from being reported. Watch out.
 * 
 * Just implementing this delegate method will disable all forms of synchronous report submission. This can
 * impact the reliability of reporting crashes very early in application launch.
 *
 **/

- (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report completionHandler:(void (^)(BOOL submit))completionHandler;

From the warning, it would seem that I wouldn't get the usual "Send Crash Report?" prompt in my app. HOWEVER, I do get this after a crash. That is, it does not seem necessary for me to implement this UI. So, what gives? Is this warning really a mis-said warning that we'll have to do our own UI for this Send Crash Report prompt in the future?

I've also looked at docs https://dev.twitter.com/crashlytics/ios and http://support.crashlytics.com/knowledgebase/topics/14721-crashlytics-sdk-for-ios but can't find anything talking about a change since 3.0.0.

Ideas?


回答1:


Mike from Fabric here.

With SDK 3.0, we added more fine-grained control over how to handle crash report submission so that you, and other developers, can display the alert or not however you want to. If you want to implement your own dialog, turn off the privacy dialog in the Fabric dashboard and you use the call provided to do that.

If you want to continue to use the privacy dialog Fabric provides, you can, but I'd encourage you to create a new one as it's more flexible and can be customized to the UI of your application.



来源:https://stackoverflow.com/questions/30493834/as-of-crashlytics-3-0-0-implementing-a-user-prompt-is-the-applications-respons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!