Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49188

Ios receiving notification but not triggering 'on' event

$
0
0

@kidenga wrote:

Hi I'm debugging on a older model.

In the xcode console I am getting the message

['Test Push6']>```

Furthermore this will open my ionic app to the main page (dashboard). However it is not triggering my 'on' event. The on event triggers on my android ZTE axon 7.

Here is the code for the event, I run it in the `app.js`

.run(function($ionicPlatform, $ionicAnalytics, $rootScope, $state, $timeout, AuthenticationService) { $rootScope.$on('cloud:push:notification', function(event, data) { var msg = data.message; console.log("hello???"); //console.log("We got a push notifcation"); //alert(msg.title + ': ' + msg.text); $state.go("app.newReportSwitch"); }); })
`

I get the "hello" message and the state switch on android, but not on IOS.

Is it possible this is an older device issue, or am I doing something wrong? maybe I am supposed to call device ready first.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>