Closed sethprogress closed 6 years ago
Can you share a repo?
Thanks for the quick reply https://bitbucket.org/nexuschurch/mynexus-app/src
Thank you!
There's an issue in 5.1.5 that pops up when the 'realtime db' feature wasn't selected. I'll correct that in 5.1.6 but I'm not entirely sure it will fix your issue as I cloned your repo, did tns run ios
, and it loaded the app just fine (bar the error about init
in the log that's fixed in 5.1.6) -- it didn't crash.
So before releasing the fix, can you please open node_modules/nativescript-plugin-firebase/firebase.ios.js and replace the
resolve` statement on line 600 by this one?
resolve(typeof (FIRDatabase) !== "undefined" ? FIRDatabase.database().reference() : undefined);
Then tns run ios
and see if that makes a difference.
I had the same issue when I installed the plugin today (first time ever). Decided to clean my platform after installation and configuration of the plugin, re-installed iOS platform, and it just worked.
But I do keep seeing this in the console:
CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:603:24: Error in firebase.init: ReferenceError: Can't find variable: FIRDatabase
Replace the line 600 from previous post, exception still present.
@manijak If you replace the line as show below, rm -rf platforms/ios
, and tns run ios
then there shouldn't be an error.
Correct, the error is now gone. thanks.
@manijak - i'm a bit new to NS, what do you mean by this: Decided to clean my platform after installation and configuration of the plugin, re-installed iOS platform?
Is that just deleting the platform folder or is it some commands.
Yeah running following commands:
tns platform remove ios
tns platform add ios
tns build ios
First I modified the resolve statement, enabled realtime and did rm -rf platforms/ios
- Successful!
Thanks for your help guys. I didn't need to remove the platform.
Create a new {N} + ng + TS, add plugin and initialize firebase as per documentation (and per ng sample) results in iOS app crashing with no errors straight after splash screen. Same as reported here: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/611