Ionic 3 Badge not working

I’m trying to set notification badges on my app, but for some reason it’s not working. Right now I just have a button for testing that, when clicked, runs this function:

setBadge() {
  try {
    this.badge.set(10);
  } catch (e) {
    console.error(e);
  }
}

When this function is called an error is caught reading:

ERROR: {"line":54169,"column":126,"sourceURL":"http://localhost:8080/build/vendor.js"}

That line in vendor.js is:

Badge.prototype.set = function (badgeNumber) { return Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordova"])(this, "set", {}, arguments); };

I’ve got Badge imported like this, as per Ionic docs here

import { Badge } from '@ionic-native/badge/ngx';

and have added Badge to my app.module.ts file.

Any ideas on what might be causing this?

Currently testing on an iPhone 8+ with iOS 12.1.2.

Did you ever get this to work?

Anyone can use badges? I’m trying but still not working