@MaurizioLiberato wrote:
Hi there I'm building an iOS app with ngCordova with push notifications. I've done all the certificate and provisioning profile stuff already and I'm using pushbots as service to send the notification to the devices. It works perfectly in iOS9 (specifically 9.1) but not in 8.4.1. By not working I mean that doesn't fire the register method so I don't get the popup asking to allow notification.
Here's my code:
document.addEventListener('deviceready', onDeviceReady, false); function onDeviceReady() { $cordovaPush.register(iosConfig).then(function(deviceToken) { $http({ method: 'PUT', url: 'https://api.pushbots.com/deviceToken', headers: { 'Content-Type': 'application/json', 'x-pushbots-appid': 'xxxxxxxxxxxxx', 'x-pushbots-secret': 'xxxxxxxxxxxxxxxx', }, data: { platform: 0, token: deviceToken, }, }); }, function(err) { alert('Registration error: ' + err); }); ...
Any idea? is this a known issue?
Thanks
UPDATE:
While building the app with cordova command line withcordova run ios --device
when on iOS 8 I see this error which I don't see when I build for iOS 9:enabledRemoteNotificationTypes is not supported in iOS 8.0 and later.
Which doesn't make sense because it works in iOS 9. I've seen some posts regarding this but very confusing indeed, any idea? Thanks
Posts: 7
Participants: 2