Note that there are some explanatory texts on larger screens.

plurals
  1. POSencha touch 2 + Apple push notifications + Ext.device.Push
    primarykey
    data
    text
    <p>I recently started developing with Sencha Touch 2, at the moment i'm creating an app that needs support for Apple Push Notifications.</p> <p>So I've created the neccesary certificates at the Apple developer center and used them to package the application with the Sencha Touch SDK tools. All went well and I'm able to run this app on my device.</p> <p>In the app I added a button to receive the device token. When I tap the button it executes the following code:</p> <pre><code> Ext.device.Push.register({ type: Ext.device.Push.ALERT | Ext.device.Push.BADGE | Ext.device.Push.SOUND, success: function (token) { console.log('# Push notification registration successful:'); Ext.Msg.alert(' token: ' + token); }, failure: function (error) { console.log('# Push notification registration unsuccessful:'); Ext.Msg.alert(' error: ' + error); }, received: function (notifications) { console.log('# Push notification received:'); Ext.Msg.alert(' ' + JSON.stringify(notifications)); } // Ext.device.Notification.show({ // title: 'My Title', // message: 'A message', // style: "login", // buttons: ["Cancel", "Login"], // callback: function (button, values, options) { // //When the user taps a button, show another notification // Ext.device.Notification.show({ // message: 'You typed: "' + values + '"' // }); // } // }); }, </code></pre> <p>When the Ext.device.Notificaion.show is uncommented, I get a message so I'm sure this piece of code gets executed. Now my problem is I don't get any message from the Ext.device.Push.register. No success, failure or received event gets fired. Has anyone over here managed to get this working, or what am I doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload