EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

Error with functions on NS7 and iOS #1698

Open stephaneQ2 opened 3 years ago

stephaneQ2 commented 3 years ago

Hi Guys,

I am running into a strange issue with the new version of the @nativescript/firebase plugin and NS 7

The following works on Android but not iOS

import { functions as fn } from "@nativescript/firebase/functions";

  public async subscribeTo(channelId: string) {
    const fns = fn.httpsCallable(
      `onHttpsCallable${pascalCase("subscribeToChannel")}`,
      "us-central1"
    );

    // For testing
    const userId = await this.user.uid;

    fns({ channelId, userId: theUserId })
     .then((data: any) => {
        console.log(">>> Subscription data: " + data.message);
      })
      .catch((err: string) => {
        console.log(">> Subscription Error: " + err);
      });
  }

On iOS, I keep getting the following "Error: FIRFunctions app projectID cannot be nil."

Is this happening to anyone else?? I posted this in slack as well. If I get any feedback from there I will post here.

@EddyVerbruggen have you seen this before?

Thanks!