ReallySmallSoftware / cordova-plugin-firebase-crashlytics

Google Firebase Crashlytics Cordova plugin
Other
32 stars 80 forks source link

Example Documentation? #4

Closed russcarver closed 6 years ago

russcarver commented 6 years ago

Can you put in your readme an example of how to use it? I have the following:

declare var FirebaseCrashlytics: any;

and then later, trying to use as:

FirebaseCrashlytics.crash();

but I get an error:

"TypeError: FirebaseCrashlytics.crash is not a function"

I chose "FirebaseCrashlytics" based on the clobber found in your plugin.xml.

ReallySmallSoftware commented 6 years ago

Sure, I'll add something - that was a bit of an oversight - sorry. Meanwhile, try this:

var crashlytics = FirebaseCrashlytics.initialise();

crashlytics.crash();
russcarver commented 6 years ago

That did it, thanks!

ReallySmallSoftware commented 6 years ago

Simple example above added to README

Sahiltuteja commented 5 years ago

unable to use in ionic 4 angular 6. Any suggestion ?