Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Notification message not shown when app is in the background #237

Closed
ViVer-7 opened this issue Dec 9, 2016 · 57 comments
Closed

Notification message not shown when app is in the background #237

ViVer-7 opened this issue Dec 9, 2016 · 57 comments
Milestone

Comments

@ViVer-7
Copy link

ViVer-7 commented Dec 9, 2016

Hi, I have a problem using this plugin, could use some help here...

I'm using curl to post a notification message to Firebase, like so:

Headers:

Content-Type:application/json
Authorization:key=[MY_AUTH_KEY]

JSON:

{
    "to" : "[MY_FIREBASE_KEY]",
    "content_available": true,
    "notification" : {
        "body" : "great match!",
        "title" : "Portugal vs. Denmark",
        "click_action": "helloworld",
        "icon": "notification_default",
        "sound" : "default",
	"priority": "high",
	"badge": 1
    }
}

Using the app sample code downloaded from Firebase, this works... So I know that my Firebase key and my authorization key are correct (and also my Apple certificate). When the app is in the background, I receive a sound and a notification in the notification centre on iOS.

Now I'm trying to use my own sample code, with the following result:
When the app is in the foreground, an event is triggered and I receive the data, so that works perfectly!
Now when the app is in the background, I would expect that (as in the sample above), iOS will play a sound, show a badge and display a notification in the notification centre....but it does not! Nothing happens...

Is something wrong with the plugin? Can anybody point me in the right direction?

Source code (main.ts) below:

// this import should be first in order to load some required settings (like globals and reflect-metadata)
import { platformNativeScriptDynamic } from "nativescript-angular/platform";

import { AppModule } from "./app.module";

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

firebase.init({
  // Optionally pass in properties for database, authentication and cloud messaging,
  // see their respective docs and 'iOSEmulatorFlush' to flush token before init.
  iOSEmulatorFlush: true,
  onPushTokenReceivedCallback: function(token) {
      console.log("Firebase push token: " + token);
  },
  onMessageReceivedCallback: function(message) {
      console.dump(message);
      console.log("Title: " + message.title);
      console.log("Body: " + message.body);
      // if your server passed a custom property called 'foo', then do this:
//      console.log("Value of 'foo': " + message.foo);
    }
}).then(
  (instance) => {
    console.log("firebase.init done");
  },
  (error) => {
    console.log("firebase.init error: " + error);
  }
);

platformNativeScriptDynamic().bootstrapModule(AppModule);
@ViVer-7
Copy link
Author

ViVer-7 commented Dec 9, 2016

Been jiggling some more with it, but it seems that calling the firebase.init only succeeds when the app is installed and run for the first time. The onPushTokenReceivedCallback is called and then we can post notifications to it.

But then I close the app (runs in background) and start it up again. The init function triggers the following line in the log: Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001.
Strange thing is, that I am able to send a notification using the 'previous' token...

@ViVer-7
Copy link
Author

ViVer-7 commented Dec 9, 2016

Okay, fail by me... Problem solved by adding 'priority': 'high' to the request...

@ViVer-7 ViVer-7 closed this as completed Dec 9, 2016
@sudhanshu-15
Copy link

I am facing the same issue. The plugin is able to recognize the foreground push messages, but nothing happens when the application is in background. Tried changing the priority to high and still no luck. @ViVer-7 Can you suggest something?

@ViVer-7
Copy link
Author

ViVer-7 commented Dec 20, 2016

No, I'm sorry... setting the priority to high worked fine for me.
Don't know what else to try...

@simonettoa
Copy link

simonettoa commented Jan 17, 2017

Hi @sudhanshu-15 , did you solve if for iOS? I am able to the foreground but not the background (in Android it works).

Below the curl command I am using:

curl -X POST --header "Authorization: key=MY_KEY" --Header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d "{"notification":{"title": "My title", "text": "My text", "sound": "default", "priority": "high", "badge":3}, "data":{"foo":"bar"}, "to": "REAL_IOS_DEVICE_TOKEN"}"

Any suggestions?

@EddyVerbruggen
Copy link
Owner

EddyVerbruggen commented Jan 17, 2017

@simonettoa Did you also configure this (UIBackgroundModes)?

@simonettoa
Copy link

simonettoa commented Jan 17, 2017

@EddyVerbruggen yes, below part of the Info.plist

    ...
`	<array>
	<string>UIInterfaceOrientationPortrait</string>
	<string>UIInterfaceOrientationPortraitUpsideDown</string>
	<string>UIInterfaceOrientationLandscapeLeft</string>
	<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIBackgroundModes</key>
<array>
		<string>remote-notification</string>
</array>
`

I receive the notification in foreground but nothing in background, then if I open the app I see the notification (I see an alert, it's what I've put)

@sudhanshu-15
Copy link

@simonettoa I am still stuck on this problem. Android works perfectly well but on iOS I can get the message in foreground but when the goes into background nothing happens. No clue how to fix this, I was hoping @EddyVerbruggen could help.

@EddyVerbruggen
Copy link
Owner

@sudhanshu-15 I'm looking at this later today with the demo app.

@EddyVerbruggen
Copy link
Owner

Confirmed it works correctly in the demo app, but:

.. please make sure you've enabled Push notifications in Xcode as mentioned in the readme (I just made it stand out more here.

Otherwise you'll only see foreground pushes.

This iOS push thing is HARD for all of us, so please be patient while configuring and testing it.

@simonettoa
Copy link

@EddyVerbruggen thanks, I will try and let you know asap!

@sudhanshu-15
Copy link

@EddyVerbruggen thanks for looking into this. I am pretty confident that I enabled Push notifications on xcode. Sorry but it is very early morning here so will check in sometime and let you know.

@EddyVerbruggen
Copy link
Owner

@sudhanshu-15 you may have removed and re-added the platforms/ios folder in the meanwhile. That would reset it.

@sudhanshu-15
Copy link

@EddyVerbruggen I am still not getting anything when the app is in background. I have enable the push notifications on Xcode.

image

This is what I am seeing in my logs:

NativeScript loaded bundle file:///System/Library/Frameworks/UserNotifications.framework
2017-01-18 11:06:44.619 sunapsisiommobile[255] [Firebase/Core][I-COR000001] Configuring the default app.
2017-01-18 11:06:44.695: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notifi
cation handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-01-18 11:06:44.696: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
2017-01-18 11:06:44.711: <FIRMessaging/INFO> FIRMessaging library version 1.2.0
2017-01-18 11:06:44.763 sunapsisiommobile[255:] <FIRAnalytics/INFO> Firebase Analytics v.3600000 started
2017-01-18 11:06:44.764 sunapsisiommobile[255:] <FIRAnalytics/INFO> To enable debug logging set the following application argumen
t: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2017-01-18 11:06:44.777: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notifica
tion receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
CONSOLE LOG file:///app/app.js:21:16: firebase.init done
NativeScript loaded bundle file:///var/containers/Bundle/Application/2285CD2B-9874-49C2-A682-8E79221A3065/sunapsisiommobile.app/F
rameworks/TNSWidgets.framework
2017-01-18 11:06:45.543 sunapsisiommobile[255] [Firebase/Core][I-COR000018] Already sending logs.
NativeScript loaded bundle file:///System/Library/Frameworks/CoreGraphics.framework
2017-01-18 11:06:46.317 sunapsisiommobile[255] [Firebase/Core][I-COR000019] Clearcut post completed.
2017-01-18 11:06:46.492 sunapsisiommobile[255] [Firebase/Core][I-COR000019] Clearcut post completed.
2017-01-18 11:06:47.900 sunapsisiommobile[255:] <FIRAnalytics/INFO> Firebase Analytics enabled
CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:244:20: User granted push notifications? true

@EddyVerbruggen
Copy link
Owner

That "Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001" is the problem, as long as you have that you won't see notifications in the background.

It's a pretty popular searchterm on Google.

Did you add you APNS certs to the developer console as well?

@sudhanshu-15
Copy link

@EddyVerbruggen I have my provisioning profile setup correctly. I also added APNS certs to developer console. I tried looking at possible solutions to "Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001" but couldn't find anything substantial.

@EddyVerbruggen
Copy link
Owner

So...

Will you share your platforms/ios folder with me so I can take a look?

@sudhanshu-15
Copy link

Can I mail it to you?

@EddyVerbruggen
Copy link
Owner

That's ok, my email is on my github profile. Make sure to just zip your platforms/ios folder, I need the entire Xcode project.

@sudhanshu-15
Copy link

sudhanshu-15 commented Jan 18, 2017

Done, shared it with you. You might have got a notification. It is on Google Drive.

@EddyVerbruggen
Copy link
Owner

Got it, thx

@EddyVerbruggen
Copy link
Owner

Comparing your and my project I see 1 important difference, can you try adding that and test again? If that doesn't fix it please zip the entire project (so I can run it), because as it turns out there's a dependency on ../../lib/ios as well which is not part of the zip :)

screen shot 2017-01-18 at 20 30 10

@sudhanshu-15
Copy link

Still getting the same error. After making changes to the entitlement file it disappears and I get this error again.
image

Uploading the project file.

@EddyVerbruggen
Copy link
Owner

You'll need to fix that first.

@sudhanshu-15
Copy link

I keep trying to fix it but every time I run tns run ios it reappears again.

@EddyVerbruggen
Copy link
Owner

Hmm, this file is supposed to take care of adding the "APS environment", perhaps it's not there or there's an error in the script:

screen shot 2017-01-18 at 20 50 18

So: is it there? If so, is there an error in the after prepare phase when doing a tns run ios?

@sudhanshu-15
Copy link

This is what I see once I reopen the Project in Xcode after running tns run ios.

image

image

I even tried to manually make changes to the entitlement file and saved it but the changes are discarded after tns run ios.

I can see the after-pepare file

image

I cannot see an error though.

@EddyVerbruggen
Copy link
Owner

You created a .DS_Store file by accident by accessing that folder with Finder (thanks, macOS!). Go to Terminal and remove it.

You can take this offline to email if you like (gets spammy!) - we'll post the result here.

@sudhanshu-15
Copy link

Sure

@jlooper
Copy link
Contributor

jlooper commented Jan 19, 2017

hi, actually I'd be grateful if you'd keep debugging here if you don't mind. I'm having a TRULY HORRIBLE time getting anything working on iOS. I have worked with other push services before (Pushbots, Urban Airship, Parse, etc) and it's never been this hard. Crazy! What my experience is is that I can't get a push notification to work at all, foreground or in the background, on iOS, but I do get an alert that tells me what gets sent through the console. I'll keep tinkering.

@sudhanshu-15
Copy link

@jlooper here is the update so far, I tried removing the hook script as @EddyVerbruggen suggested but still the app is not able to receive notifications in background. I am still getting the <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1
001 "(null)"
warning during initialisation. Not able to overcome this even though I rechecked the provisioning profiles and APNS certs.

@simonettoa
Copy link

@EddyVerbruggen I'm having the same behavior of @sudhanshu-15
In the log file I have the same output:

`Successfully run application org.nativescript.firebaseTest on device with ID 4e4aeec59464a57d30ede11b8c1a14ede6fff1ae.

2017-01-19 12:38:50.640 firebaseTest[315] [Firebase/Core][I-COR000001] Configuring the default app.

2017-01-19 12:38:50.657 firebaseTest[315:] <FIRAnalytics/INFO> Firebase Analytics v.3600000 started

2017-01-19 12:38:50.657 firebaseTest[315:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)

2017-01-19 12:38:50.660 firebaseTest[315] [Firebase/Crash][I-CRA000004] Successfully enabled

2017-01-19 12:38:50.669: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO

2017-01-19 12:38:50.670: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"

2017-01-19 12:38:50.674: <FIRMessaging/INFO> FIRMessaging library version 1.2.0

2017-01-19 12:38:50.707: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO

2017-01-19 12:38:50.737 firebaseTest[315] [Firebase/Core][I-COR000018] Already sending
logs.
CONSOLE LOG file:///app/app.ts:40:18: **************** firebase.init done

2017-01-19 12:38:51.033 firebaseTest[315] [Firebase/Core][I-COR000018] Already sending logs.

2017-01-19 12:38:51.127 firebaseTest[315] [Firebase/Core][I-COR000019] Clearcut post completed.

2017-01-19 12:38:51.204 firebaseTest[315] [Firebase/Core][I-COR000019] Clearcut post completed.

2017-01-19 12:38:51.262 firebaseTest[315] [Firebase/Core][I-COR000019] Clearcut post completed.

2017-01-19 12:38:51.346 firebaseTest[315:] <FIRAnalytics/INFO> Firebase Analytics enabled

CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:244:20: User granted push notifications? true

CONSOLE LOG file:///app/main-view-model.ts:49:28: token from google cGNtdJ0uxAM:APA91bHp3sKfrv92B69RzN0e25pVnvt2K2PyGm9gTVsQd7Df3DENhngNRc_uf6VxdVg3ldWS1vdiHavolHLzImwWrRMXpkki1WdwrVj-O30L8bnHsuqDF6aocNphoqORFVtRwRrudA2_
`

I've put the registration token event in a button, so after the load of the app.
I get the token, the notification arrives on foreground but NOT in background (and if the app is reduced and I re-open the app the notification is shown).

I've tried to launch the app trough Xcode but I have the same messsage of sudhanshu-15 about --> 'clang: error: linker command failed with exit code 1 (use -v to see invocation)'
I didn't understand what I am suppose to remove - the hook script!?!?

@sudhanshu-15
Copy link

@simonettoa You can remove the Hook script from the project folder if your entitlements file is getting changed every time you run tns run

@jlooper
Copy link
Contributor

jlooper commented Jan 19, 2017

This is as far as I am able to get... I can signup for push, get a token, and get a message from Firebase as an alert, but it doesn't come as a true push.

1
2
3

@jlooper
Copy link
Contributor

jlooper commented Jan 19, 2017

...and to pile on to poor @EddyVerbruggen my logs are the same: (what's all that about APNS token Error and swizzling?)

2017-01-19 13:09:55.229: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-01-19 13:09:55.229: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
2017-01-19 13:09:55.248: <FIRMessaging/INFO> FIRMessaging library version 1.2.0
2017-01-19 13:09:55.298: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO

@sudhanshu-15
Copy link

sudhanshu-15 commented Jan 19, 2017

Guess we all are facing the same issue. As per my conversation with @EddyVerbruggen the root cause of not getting a true push is:

<FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"

Google search of this issue didn't yield any fruitful result. Let's hope we can find a solution soon.

@EddyVerbruggen
Copy link
Owner

@jlooper Can you send me your project so I can zoom in on your issue as well?

@EddyVerbruggen
Copy link
Owner

@jlooper AFAIK it boils down to the file /platforms/ios/yourappname/Resources/yourappname.entitlements - that should look like this:

<?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>aps-environment</key>
	<string>development</string>
	<key>keychain-access-groups</key>
	<array>
		<string>$(AppIdentifierPrefix)your.package.id</string>
	</array>
</dict>
</plist>

The important bit being:

	<key>aps-environment</key>
	<string>development</string>

I can confirm the full project @sudhanshu-15 gave me lacks it and like I said I will investigate ways to add it. Once I have new info I will of course add it here.

@jlooper
Copy link
Contributor

jlooper commented Jan 19, 2017

Mine looks correct, as per the model above. There may be more info on this thread: firebase/quickstart-ios#111

@sudhanshu-15
Copy link

@EddyVerbruggen even after removing the entitlement hook script, the entitlements file is being overwritten every time I tns run ios. I manually added:

<key>aps-environment</key> <string>development</string>

But it gets overwritten every time.

@EddyVerbruggen
Copy link
Owner

EddyVerbruggen commented Jan 19, 2017

@samuelagm Yeah I rechecked the hook script and it actually looks for an existing script and doesn't touch it if it exists already. I just returned from my dayjob and pushed code to a few other plugins, not I'm diving back into this issue. Oh but first I need to put the kids to bed so don't hold your breath.

@jlooper Sounds like you should be ok from the plugin side. I'd love to check your firebase console and certificates at this point.

@sudhanshu-15
Copy link

@EddyVerbruggen thanks a lot for helping out. I am available whenever you are ready to look into this again.

@simonettoa
Copy link

simonettoa commented Jan 20, 2017

@EddyVerbruggen btw thanks a lot for the help

@EddyVerbruggen EddyVerbruggen added this to the 3.9.2 milestone Jan 20, 2017
EddyVerbruggen added a commit that referenced this issue Jan 20, 2017
iOS Notification not received in background mode #258
iOS: Push Notifications not working in Background or when application is reopened #243
Notification message not shown when app is in the background #237
@EddyVerbruggen
Copy link
Owner

Please update to 3.9.2 and take note of the update messaging instructions, let me know if issues remain afterwards.

@sudhanshu-15
Copy link

@EddyVerbruggen it works like a charm!! Thanks a lot!! Now getting push notifications even when the app is in background.

@EddyVerbruggen
Copy link
Owner

That's quick, thanks for letting me know :)

@simonettoa
Copy link

Hi there, it's still not working for me. What i've done:

  • updated the package.json file with the new version, delete the app from the real device, delete node_modules folder and platforms folder.
  • tns install | then tns run ios (just to create the ios project, in my scenario is not possible to run the app directly until I install it using Xcode and passing it thorough Xcode --> Window --> Devices)
  • opened the Xcode project and turned on the push notifications in Capabilities
  • checked the myAppName.entitlements file, it was already in the right folder [app/App_Resources/iOS/] and it had all the lines per instructions
  • tried to delete the firebase-install-ios-entitlements.js, but it was not present in the hooks/after-prepare/ folder
  • copied the *ipa file using the Xcode --> Window --> Devices
  • run tns run ios

then the logs are similar than the old one with the same APNS failed error

Project successfully built Successfully deployed on device with identifier '4e4aeec59464a57d30ede11b8c1a14ede6fff1ae'. Mounting /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.1 (14B72)/DeveloperDiskImage.dmg [Mounting] LookingUpImage Successfully run application org.nativescript.firebaseTest on device with ID 4e4aeec59464a57d30ede11b8c1a14ede6fff1ae. 2017-01-23 08:35:22.092 firebaseTest[1317] <Debug> [Firebase/Core][I-COR000001] Configuring the default app. 2017-01-23 08:35:22.108 firebaseTest[1317:] <FIRAnalytics/INFO> Firebase Analytics v.3600000 started 2017-01-23 08:35:22.108 firebaseTest[1317:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu) 2017-01-23 08:35:22.109 firebaseTest[1317] <Info> [Firebase/Crash][I-CRA000004] Successfully enabled 2017-01-23 08:35:22.117: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)" 2017-01-23 08:35:22.127: <FIRMessaging/INFO> FIRMessaging library version 1.2.0 2017-01-23 08:35:22.183 firebaseTest[1317] <Debug> [Firebase/Core][I-COR000018] Already sending logs. CONSOLE LOG file:///app/app.ts:40:18: **************** firebase.init done 2017-01-23 08:35:22.368 firebaseTest[1317] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed. 2017-01-23 08:35:22.984 firebaseTest[1317] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed. 2017-01-23 08:35:23.310 firebaseTest[1317:] <FIRAnalytics/INFO> Firebase Analytics enabled CONSOLE LOG file:///app/main-view-model.ts:49:28: token from google eqUNe0zQ580:APA91bEYEAm_YZHA_Z_gpU4WrCoqJD-HbLqWiGhBpNHhAiD2MnKS6zD8_AwMky562yKdam3ZU8096sfzbbiKE0eR90GnFkATJ__MzOlq17U4B41w7sJHZpiU6YkXoVMwG8gXbaqsrWZJ

I came from Xamarin, so to check if it's a certificate issue, I've created a small project and checked the notifications.
I've tested in debug mode with the SandBox development certificate and also in Ad hoc distribution with the Production certificate, both work as expected foreground and background.

I don't know what else to do, if you want @EddyVerbruggen I can send you my project, maybe there's something I haven't done correctly.
Let me know if you want/can to do and what you need. Thanks in advance.

@simonettoa
Copy link

simonettoa commented Jan 24, 2017

Btw I was able to launch the app also through Xcode, but still same message error/warning and same result, foreground works, background not. And this is a *.ts simple project made just to test firebase notifications.

@EddyVerbruggen
Copy link
Owner

@simonettoa can you send the entire project?

@simonettoa
Copy link

@EddyVerbruggen I just shared a folder in dropbox with the entire project, thanks! I used your email address from github.

@EddyVerbruggen
Copy link
Owner

@simonettoa You're doing everything right, except you need to remove <key>FirebaseAppDelegateProxyEnabled</key><false/> from app/app_resources/ios/xx.plist

@simonettoa
Copy link

@EddyVerbruggen it works...that was the error; THANKS A LOT!!!

Still in the log I can see the same 'warning'. Just for the record.

2017-01-24 14:17:37.236 firebaseTest[1654:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2017-01-24 14:17:37.236 firebaseTest[1654:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2017-01-24 14:17:37.237 firebaseTest[1654] [Firebase/Crash][I-CRA000004] Successfully enabled
2017-01-24 14:17:37.245: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-01-24 14:17:37.246: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
2017-01-24 14:17:37.248: <FIRMessaging/INFO> FIRMessaging library version 1.2.0
2017-01-24 14:17:37.279: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-01-24 14:17:37.310 firebaseTest[1654] [Firebase/Core][I-COR000018] Already sending logs.
CONSOLE LOG file:///app/app.ts:40:18: **************** firebase.init done
...

EddyVerbruggen added a commit that referenced this issue Apr 18, 2017
iOS Notification not received in background mode #258
iOS: Push Notifications not working in Background or when application is reopened #243
Notification message not shown when app is in the background #237
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants