iOS push notification

My NotificationPage.ux

 <Panel ux:Class="NotificationPage">
<Router ux:Dependency="router"/>
<JavaScript File="NotificationPage.js"/>
    <StackPanel>
        <Text Value="{notificationPayload}" TextColor="#fff"/>
	</StackPanel>
   </Panel>

My NotificationPage.js file. I did add Fuse.PushNotifications on .unoproj file. My question is why can’t I console print the device id on iOS preview?. On Android it prints but not in iOS.

var push = require("FuseJS/Push");
var Observable = require("FuseJS/Observable")
var notificationPayload = Observable("Payload will display here");

var push = require("FuseJS/Push");

push.on("registrationSucceeded", function(regID) {
    console.log("Reg Succeeded: " + regID);
    notificationPayload.value=regID;
});

push.on("error", function(reason) {
    console.log("Reg Failed: " + reason);
});

push.on("receivedMessage", function(payload) {
    console.log("Recieved Push Notification: " + payload);
});
module.exports={ notificationPayload }

ignore the above question. How to push notification at same time in multiple devices on iOS. I did followed this github post https://github.com/fuse-compound/Fuse.APNS. Android seems easy to send push on multiple devices. However, I can’t do with iOS. I have to do individually if i want to push to iOS.

Take a look at this repository: https://github.com/fuse-compound/FuseExample_Using_APNS_and_Firebase_Together

Hi Uldis,

I did followed the same tutorial but didn’t work. It shows only registration id (rID) on device that’s all. When I open firebase app and try sending notification. It says successful but nothing on devices. if you would like to see i can upload it into dropbox and see what wrong I did.

This is my .unoproj

 {
 "Packages": [
  "Fuse",
  "FuseJS",
  "Fuse.BasicTheme"
 ],
  "Projects": [
   "src/Fuse.APNS.unoproj",
  ],
  "Includes": [
    "*",
    "GoogleService-Info.plist:ObjCSource:iOS"
  ],
  "Firebase": {
   "GoogleServices": {
    "iOS": "GoogleService-Info.plist"
   }
  },
}

You need to make sure that you’re pushing notifications via Apple APNS server, and that you’re using the right APNS - there’s two, sandbox and production.

Firebase notifications on iOS can only be delivered to a Fuse app when the app is running in foreground; so you should be getting it in push.on("receivedMessage", function(payload) { ..., but the notification will not be added to the notification tray, unless you send it via APNS.

This is mostly a configuration / backend thing that has little to do with Fuse.