LoginSignup
1
1

More than 5 years have passed since last update.

iOSアプリの通知スタイルの設定が表示されない件

Last updated at Posted at 2016-04-14

「SenchaTouch + Cordova」のiOS、Androidアプリ開発ではまったことを少しメモする。

通知スタイルの設定が表示されない

変更前
touch/src/device/push/Cordova.js
    setPushConfig : function (config) {
        var methodName = Ext.id(null, 'callback');

        //Cordova's PushPlugin needs a static method to call when notifications are received
        Ext.device.push.Cordova.callbacks[methodName] = config.callbacks.received;

        return {
            "badge"    : (config.callbacks.type === Ext.device.Push.BADGE) ? "true" : "false",
            "sound"    : (config.callbacks.type === Ext.device.Push.SOUND) ? "true" : "false",
            "alert"    : (config.callbacks.type === Ext.device.Push.ALERT) ? "true" : "false",
            "ecb"      : 'Ext.device.push.Cordova.callbacks.' + methodName,
            "senderID" : config.senderID
        };
    },

変更後
touch/src/device/push/Cordova.js
    setPushConfig : function (config) {
        var methodName = Ext.id(null, 'callback');

        //Cordova's PushPlugin needs a static method to call when notifications are received
        Ext.device.push.Cordova.callbacks[methodName] = config.callbacks.received;

        return {
            "badge"    : (config.callbacks.type & Ext.device.Push.BADGE) ? "true" : "false",
            "sound"    : (config.callbacks.type & Ext.device.Push.SOUND) ? "true" : "false",
            "alert"    : (config.callbacks.type & Ext.device.Push.ALERT) ? "true" : "false",

            "ecb"      : 'Ext.device.push.Cordova.callbacks.' + methodName,
            "senderID" : config.senderID
        };
    },

実装済みアプリ

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1