I'm currently working on a project using Nativescript.
While everything runs smoothly with Firebase on the local emulator, I encounter errors when testing the application on my iPhone. The specific error message is:
CONSOLE LOG file:///app/vendor.js:2172:24: Error in firebase.login: ReferenceError: Can't find variable: FIRAuth
I suspected it might be related to where I initialized Firebase, so I moved firebase.init()
from app.models.ts
to the initial view based on suggestions from other forum posts.
The discrepancy between emulator and device performance has left me puzzled.
If anyone can offer some insight, that would be greatly appreciated.
Environment:
Device: iPhone SE,
Framework: Nativescript (Angular)
Dependencies: Firebase, nativescript-plugin-firebase
If more information is needed, feel free to ask.
GoogleService-info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>xxxxxxxxx.apps.googleusercontent.com</string>
// Other key-value pairs here...
</dict>
</plist>
firebase.nativescript.json
{
"external_push_client_only": false,
// Other configuration settings listed here...
}