NativeScript Firebase plugin Apple Sign in - Argument must be an object

236 views Asked by At

I have set up Apple Sign In based on the official guide. I'm testing on iOS and when I initiate Apple Sign In I get this error:

Error in firebase.login: Error: Argument must be an object.

I am using Nativescript 7.0.8, @nativescript/firebase 11.0.0, nativescript-vue 2.8.1 My iOS/app.entitlements:

<?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>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
</dict>
</plist>

My Apple Sign In method:

doLoginByApple () {
        firebase.login({
          type: firebase.LoginType.APPLE,
          appleOptions: {
            locale: "en",
            scopes: ["name", "email"]
          }
        }).then(
            result => console.log("Apple login OK: " + JSON.stringify(result)),
            errorMessage => {
              alert({
                title: "Login error",
                message: errorMessage,
                okButtonText: "OK, pity"
              });
            }
        );
      }

Have also created Identified through Apple Developer Console with Apple Sign In capability and enabled Apple Sign in via Firebase Console.

Why am I getting this error?

1

There are 1 answers

2
Emil Georgiev On

@Dog Stevenson - I found something which will help you. You can try to modify the node modules package and to fix this on your computer:

https://github.com/EddyVerbruggen/nativescript-plugin-firebase/pull/1686/commits/c80aa95acb7ca0847377f158311b943dd9286bcd