首页 > 解决方案 > Nativescript-firebase-plugin:身份验证在 iOS 上不起作用

问题描述

我在我的 Windows 10 计算机上使用 Nativescript sidekick 在我的 iPhone 中构建我的 iOS 应用程序,但似乎 nativescript-firebase-plugin 不适用于 iOS 中的 Google Auth。请问,你知道为什么吗?我阅读了一些建议从设置中删除 Google 身份验证的评论,但它对我不起作用。

在我的 Android 应用程序中,一切正常。

这是我的 Angular 身份验证服务:

    constructor(
    public router: Router
) {
    super();
    firebase.init({
        onAuthStateChanged: function (data) {
            console.log(data.loggedIn ? 'Logged in to firebase' : 'Logged out from firebase');
            if (data.loggedIn) {
                console.log('users email address: ' + (data.user.email ? data.user.email : 'N/A'));
            }
        }
    }).then((instance) => {
        console.log('[*] Firebase was successfully initialised');
    }, (error) => {
        console.log('[*] Huston we have an initialization error: ' + error);
    });
}

这是错误消息:

[错误] ** ARCHIVE FAILED ** 以下构建命令失败:CompileC /tmp/builds/_/6a0151efb9b3ac160998acc93164432d4b0f1ea7/6.3.3/6.3.0/tfm/platforms/ios/DerivedData/tfm/Build/Intermediates.noindex/ArchiveIntermediates /tfm/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/A... AppAuth/Source/iOS/OIDAuthorizationService+IOS.m 正常 armv7 Objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 失败) “构建失败,错误代码 2”。

标签: iosangulartypescriptfirebasenativescript

解决方案


推荐阅读