firebase tag.CocoaPods (select one)The doc here suggests that the new way to force crash with Firebase Crashlytics is to use assert(NO) as the legacy [[Crashlytics sharedInstance] crash] has been removed. However, it seems that assert(NO) doesn't actually generate a exception.clsrecord file, which is one of the files the SDK looks for when submitting the crash logs.
Generate a crash using assert(NO), observe no exception.clsrecord file generated under <crashlytics root>/v5/reports/active/<uuid>
Replacing assert(NO) with @throw NSInternalInconsistencyException; leads to exception.clsrecord generated at the location.
See https://firebase.google.com/docs/crashlytics/test-implementation?platform=ios for an example.
It could be based on your project configuration that assert(NO) might not trigger a crash - we might update the docs for this to use a different method. A couple other ways I do it are:
@[][1]int *a = nil; *a = 0;It could be based on your project configuration that
assert(NO)might not trigger a crash - we might update the docs for this to use a different method. A couple other ways I do it are:
@[][1]int *a = nil; *a = 0;
Thanks for the quick response. Would be interested to know what project configuration to tweak to enable assert(NO) to crash as that's definitely a cleaner way than any of the suggested alternatives.
I believe it's the existence of the NDEBUG preprocessor macro that will disable assert - looking at https://stackoverflow.com/questions/18339913/does-the-ns-block-assertions-disable-both-nsassert-and-assert-calls?lq=1
Actually to be clear the app did crash on assert. It's just not triggering the hooks in firebase SDK to generate the dump needed by crashlytics. See my comments above.
It could be based on your project configuration that
assert(NO)might not trigger a crash - we might update the docs for this to use a different method. A couple other ways I do it are:
@[][1]int *a = nil; *a = 0;
This did the trick for me! assert(NO) wasn't working at all!
It could be based on your project configuration that
assert(NO)might not trigger a crash - we might update the docs for this to use a different method. A couple other ways I do it are:
@[][1]int *a = nil; *a = 0;This did the trick for me!
assert(NO)wasn't working at all!
This worked for me also! assert(NO) was not reporting in the dashboard!
Alright we've updated the public docs. Change will take a bit to propagate. Thanks for reaching out folks!
Most helpful comment
Alright we've updated the public docs. Change will take a bit to propagate. Thanks for reaching out folks!