Code Monkey home page Code Monkey logo

Comments (17)

yogeshwar607 avatar yogeshwar607 commented on July 21, 2024 1

Solved issue by removing platform ios and adding it again .
Thanx for ur effort and time.

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on July 21, 2024

Did you download GoogleService-Info.plist and add it to app/App_Resources/iOS/? See https://firebase.google.com/support/guides/firebase-ios

from nativescript-plugin-firebase.

yogeshwar607 avatar yogeshwar607 commented on July 21, 2024

Yes , i have included GoogleService-Info.plist file
On Jun 29, 2016 3:40 PM, "Eddy Verbruggen" [email protected] wrote:

Did you download GoogleService-Info.plist and add it to
app/App_Resources/iOS/? See
https://firebase.google.com/support/guides/firebase-ios


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#63 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AJl9AyWevuIjVp7V0UW7OOfxAspasFvkks5qQkSDgaJpZM4JAkd9
.

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on July 21, 2024

Please share your project with me so I can debug it.

from nativescript-plugin-firebase.

yogeshwar607 avatar yogeshwar607 commented on July 21, 2024

I can't access my machine now but will share it after 3 hours
On Jun 29, 2016 3:43 PM, "Eddy Verbruggen" [email protected] wrote:

Please share your project with me so I can debug it.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#63 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AJl9A8LvL0Ly798FY8W45xf10wKlEGkcks5qQkVbgaJpZM4JAkd9
.

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on July 21, 2024

No hurry, thanks!

from nativescript-plugin-firebase.

chillyprig avatar chillyprig commented on July 21, 2024

I also get

Jul 25 02:59:31 Popeyes-MacBook-Pro KickoffToday[2067]: CONSOLE LOG file:///app/main.js:12:16: firebase.init error: ReferenceError: Can't find variable: FIRApp

I already put GoogleService-info.plist in the correct folder:

screen shot 2559-07-25 at 03 00 49

I'm using the code from https://docs.nativescript.org/angular/tutorial/ng-chapter-3 but have no luck integrate it with nativescript-plugin-firebase.

Here is the code in main.ts

import {nativeScriptBootstrap} from "nativescript-angular/application";
import {AppComponent} from "./app.component";
import {Config} from "./shared/config";

var firebase = require('nativescript-plugin-firebase');

firebase.init({
    url: Config.firebase.databaseURL,
    persist: true // Persist data to disk. Default false.
}).then(
    function (result) {
        console.log("firebase.init done: " + result);
    },
    function (error) {
        console.log("firebase.init error: " + error);
    }
);

nativeScriptBootstrap(AppComponent);

Do I missing something?

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on July 21, 2024

@chillyprig can you please retry with the latest (3.5.0) version of this plugin?

from nativescript-plugin-firebase.

yoojene avatar yoojene commented on July 21, 2024

Hi @EddyVerbruggen I know this has been closed but I'm still getting the same error setting up on my demo app with the latest plugin

Sep 1 12:53:03 ip-172-16-1-25 nsexerciseDaily[46170]: CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:372:18: Error in firebase.init: ReferenceError: Can't find variable: FIRApp

Followed the setup instructions and downloaded the GoogleService-Info.plist file to App_Resources/iOS

versions:
nativescript-plugin-firebase │ ^3.5.4

$ tns --version
2.2.1

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on July 21, 2024

@yoojene How are you starting the app, and on which device / simulator?

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on July 21, 2024

@yoojene Oh, and does this "hack" work for you as well? #76

from nativescript-plugin-firebase.

yoojene avatar yoojene commented on July 21, 2024

Using the iOS emulator ( tns run ios --emulator --watch) which is loading up a 9.3 instance. I just found that hack but no didn't work, I'm not trying anything wrt auth or storage - seems to fail straight away at firebase.init({))

I don't have to declare FIRApp somewhere as a constant do I? Similar to the URL in the web app version?

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on July 21, 2024

Do you have this? I mean requiring the plugin before application.start().

from nativescript-plugin-firebase.

yoojene avatar yoojene commented on July 21, 2024

Yep - this is my app.ts

The page loads but with the error above


import application = require("application");
import firebase = require("nativescript-plugin-firebase");

firebase.init({

  // Optionally pass in properties for database, authentication and cloud messaging,
  // see their respective docs.

}).then(
  (instance) => {
    console.log("firebase.init done");
  },
  (error) => {
    console.log("firebase.init error: " + error);
  }
);

application.start({ moduleName: "views/login/login" });

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on July 21, 2024

Looks legit. Can you try tns emulate ios (without the watch, or livesync features) and see if that helps? If not remove and readd your iOS platform as well.

from nativescript-plugin-firebase.

yoojene avatar yoojene commented on July 21, 2024

Hmm OK that worked fine, then when I've retried the previous command, it worked too! thanks for the help man.

from nativescript-plugin-firebase.

phil-fuber avatar phil-fuber commented on July 21, 2024

@EddyVerbruggen hi Eddy sadly i have also encountered this issue and it is preventing me from continuing my Firebase integration. I am using tns version 2.2. I have thoroughly checked the code and tried all the fixes and other suggestions here and in the other related issue.

from nativescript-plugin-firebase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.