I’m trying to make a notification app on iOS, and I’m really stuck here.
I followed all the steps in the documentation, I generated an apn_dev certification, I created a Security Profiles and I enabled notification in xcode project,
here is my libraries :
<script src="lib/bluebird.min.js"></script>
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/ionic.cloud.min.js"></script>
<script src="cordova.js"></script>
<script src="js/app.js"></script>
here is my app.js :
.config(function($ionicCloudProvider) {
$ionicCloudProvider.init({
"core": {
"app_id": "xxxx"
},
"push": {
"sender_id": "12345",
"pluginConfig": {
"ios": {
"badge": true,
"sound": true
},
"android": {
"iconColor": "#343434"
}
}
}
});
})
.controller('MyCtrl', function($scope, $ionicPush) {
$ionicPush.register().then(function(t) {
return $ionicPush.saveToken(t);
}).then(function(t) {
console.log('Token saved:', t.token);
});
$scope.$on('cloud:push:notification', function(event, data) {
console.log(data);
});
The subscription works fine, I get the log saying :
Ionic Push: saved push token:XXXXXXX
And I even check the cloud server : The device token exists in the result of a GET : https://api.ionic.io/push/tokens
BUT when I try to send a notification to the device, I get nothing what am I missing?