Nativescript-plugin-firebase push works on dev but not working with testflight


Hi everyone

I’ve implemented push notifications for IOS using the Firebase plugin, following directions on the plugin page and comments from the forum, specially the setTimeout which seemed to make it work for me.

So on the app that I deployed directly on my iPhone from Xcode, it works fine, I’m able to send push notifications and see it in the phone, background mode, everything works.

However, I’ve put the app on testflight for other internal users, and when we open the app that is installed via testflight, we don’t even get the question “Do you allow this app to send you Notifications”.

I do have dev and prod certificates.

Any ideas on what I am missing?

Thank you


This piqued my curiosity, so I checked StackOverflow. Could it be something odd with your certs, specific to TestFlight?


Thanks for the response Jen, as always! I’ve seen this post and pretty much everything else you can find on the subject by googling, forums and stackOverflow. I’ve been trying everything I can think of with no success.

I’ve tried (and am still trying) to change certs, new certs, new app; trying everything I can think of.

It works perfectly on my own phone, that I’ve deployed directly from computer. But when I send to apple itunnesConnect, and allow users to install the app using testflight, they don’t even get that initial alert saying "…Do you allow this app to send you notifications blah blah blah "

I’m thinking of ways to be able to debug, to see what’s going on with the firebase.init, if the callback is being called or not.

Any ideas or suggestions would be appreciated.

Thank you


that’s really crazy. I wonder if @eddy could give us a hand here. Ever seen this sort of thing?


Yes, crazy, I’ve been playing with it trying to figure out what I’m doing wrong. Thank you!


A bit hard to say without code and access to the Apple membership pages, so here’s some ideas:

  • What’s the content of app/App_Resources/iOS/*.entitlements?
  • Which App ID did you use to sign the TF app? Does it include the ‘Push Notifications’ service?
  • Does the App ID have both dev and prod push certificates?

And which iOS version is this? Code branches you hit are a bit different for iOS < 10. But if you test the local and TF versions on the same device then that should not be a factor here.


Eddy, thanks for your help!

It’s hard to debug because problem only happens on devices getting the app via testflight, so I can’t really debug or see the console.logs. So I’ve added API calls to my back end to kind of give me an idea of what’s going on with Firebase.init. Is it finishing? Is getting an error? If so, what error?

So here is the error I’m getting:
ReferenceError: Can’t find variable: FIRServerValue

I’m going to research now, but maybe it rings a bell to you.

Thank you


I found this post,
where someone has the same issue and you @Eddy suggests that maybe the Firebase sdk hasn’t loaded yet.

I’m calling from app.ts, as soon as the app loads, so maybe that’s the problem?


I think I need to wrap that call around applicationOn(launchEvent, function (args: ApplicationEventData)
so that the sdk can load before I try to init. I’m gonna try that.


Tried a few different things but still getting:
ReferenceError: Can’t find variable: FIRServerValue

@Eddy any ideas on how I can fix this?


OK, so by now we know this issue doesn’t concern push but the Firebase SDK not being loaded at all.

@jen.looper don’t you have a working iOS release build (TF or AppStore) with the Firebase plugin?


I do, both PracticeBuddy and PocketRave are in production using Firebase. We also have Emoting and QuickNoms running for demos.

Take a look at QuickNoms, it’s the most up to date:


Hi @jen.looper and @Eddy, let me start by thanking you both for taking the time to try to help me.

I got it working just now! Important part is, before creating the archive release, i have to call:
tns build ios --release

This creates the file:
plugins-release.xcconfig which contain the correct PODS_ROOT = ${SRCROOT}/Pods

Up until now, I’ve been having to manually add the PODS_ROOT = ${SRCROOT}/Pods on the release line of xcode.

The Firebase.init works now, the warning “would you like to send notifications…” comes up, so I’m gonna make sure the notifications work, but I expect it to work just like it does in dev.

Thank you!!


It used to be that you would do ‘tns prepare ios’ and then do the build, so that may be another piece of the puzzle. Glad you sorted it!


Yep, I do the prepare first, but the key for this was to add the --release

Push is working.

Thank you very much Jen!!


Hi, I need serious help. My developer made an app using Nativescript, Angular 2, Nodes.js and Firebase and he’s having a bad time in a few spots, and he is making no progress. Do you think you could help or look to see if you can help? or maybe you know someone that knows these technologies? One problem is that when we click on CREATE EVENT button to add an event to the map, nothing happens. My guy cannot figure out why. I really need help and happy to pay.

Thank you

Kelly Hill


Can your developer post the questions here? That would be preferable. Thanks!