FuseJS/Push Problem

Hi,
I’m trying to implement Push Notifications. I’ve done everything like in the docs.

...
 "Packages": [
  	"Fuse",
  	"FuseJS",
    "Fuse.Scripting",
    "Fuse.PushNotifications"
  ],
  "Android": {
    "GooglePlay": {
      "SenderID": "myprojectid"
    }
  }
...

but if i write

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

I get the following error in the monitor when i preview the app on a device:

 Error message: Uncaught require(): module not found: FuseJS/Push

Did i miss something?

If preview was already running before you made changes to the .unoproj then you should try to exit / close and restart it.

I closed everything i had open and deleted the preview app on the phone. It seems to work now. Thanks for the fast answer…

Great! :slight_smile:

In the not-too-distant future we’ll be providing functionality that’ll let you know when you’ve made a change that won’t get automatically picked up by preview.

However, the rule of thumb is that

  • Adding / removing packages
  • Changing compiled code (Uno or ObjC / Java)

will require preview to be rebuilt / restarted.

Ok Thanks :slight_smile: