Nativescript - 参考错误:FIRAuth

亨斯勒软件

我目前正在使用 Nativescript 开发应用程序。

在本地模拟器上使用 Firebase 一切正常,但是当我在 iPhone 上测试应用程序时,出现以下错误

CONSOLE LOG file:///app/vendor.js:2172:24: Error in firebase.login: ReferenceError: Can't find variable: FIRAuth

我认为这可能与我初始化 Firebase 的位置有关,所以我firebase.init()app.models.ts其他论坛帖子中阅读的第一个视图转移到了第一个视图。

我真的很困惑为什么这可以在模拟器上完美运行,但在我的设备上却没有。

如果有人能发出一些光,那将是惊人的。

Stack:
    iPhone SE,
    Nativescript (Angular)
    Firebase
    nativescript-plugin-firebase

如果您需要更多信息,请随时询问。

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>
    <key>REVERSED_CLIENT_ID</key>
    <string>com.googleusercontent.apps.xxxxxxxxxxxx</string>
    <key>API_KEY</key>
    <string>xxxxxxxxxxxxxxxxxxxxxxxxxxx</string>
    <key>GCM_SENDER_ID</key>
    <string>xxxxxxxxx</string>
    <key>PLIST_VERSION</key>
    <string>1</string>
    <key>BUNDLE_ID</key>
    <string>org.nativescript.xxxxxxxxx</string>
    <key>PROJECT_ID</key>
    <string>xxxxxxxx</string>
    <key>STORAGE_BUCKET</key>
    <string>xxxxxxxx.appspot.com</string>
    <key>IS_ADS_ENABLED</key>
    <false></false>
    <key>IS_ANALYTICS_ENABLED</key>
    <false></false>
    <key>IS_APPINVITE_ENABLED</key>
    <false></false>
    <key>IS_GCM_ENABLED</key>
    <true></true>
    <key>IS_SIGNIN_ENABLED</key>
    <true></true>
    <key>GOOGLE_APP_ID</key>
    <string>1:xxxxxxxxx:ios:xxxxxxxxx</string>
    <key>DATABASE_URL</key>
    <string>https://xxxxxxxxx.firebaseio.com</string>
</dict>
</plist>

firebase.nativescript.json

{
    "external_push_client_only": false,
    "using_ios": true,
    "using_android": true,
    "firestore": true,
    "realtimedb": true,
    "authentication": true,
    "remote_config": false,
    "performance_monitoring": false,
    "messaging": false,
    "in_app_messaging": false,
    "crashlytics": false,
    "storage": true,
    "functions": false,
    "facebook_auth": false,
    "google_auth": false,
    "admob": false,
    "dynamic_links": false,
    "ml_kit": false
}
亨斯勒软件

如果您使用nativescript-plugin-firebase.

您收到以下错误:-

Plugin nativescript-plugin-firebase is not included in preview app on device 3CDExxxx-xxxx-xxxx-xxxx-960121C3xxxx and will not work.

该应用程序将运行,但您将无法使用任何 Firebase 模块。

我希望这可以帮助有同样问题的人。

如果有人知道解决方法,而无需从 Apple 购买许可证进行测试,请在评论中告诉我。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章