estou com problemas para pegar o id do dispositivo do onesignal.
estou tentando utilizar o seguinte método:
var getId = function(){
window.plugins.OneSignal.getIds(function(ids) {
alert('getIds: ' + JSON.stringify(ids));
});
}
Antes disso estou iniciando o onesginal e está recebendo as notificações normalmente.
window.plugins.OneSignal
.startInit("APP_ID")
.handleNotificationOpened(notificationOpenedCallback)
.endInit();
no console está dando este erro:
Refused to execute inline event handler because it violates the following Content Security Policy directive: "default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.