2017-08-07 16 views
0

私はIONIC 1を使用し、分析とプッシュ通知にclevertapを使用してアプリケーションを構築しました。私はアンドロイドのため、それが正常に動作しているが、IOSのためにそれが動作していない、CLEVERTAPのプッシュ通知を消費するIONICプッシュ通知のClevertapがIOSのために機能しない

CleverTap Cordova Plugin

を公式コルドバのプラグインを使用しています。誰もこれで私を助けることができますか?あなたが設定するには、以下のリンクお使いのAppleの証明書で与えられた手順を実行する必要がありiOS用のプッシュ通知の設定についてはここで

サンプルの初期化コード、

var app = { 
initialize: function() { 
    this.bindEvents(); 
}, 
bindEvents: function() { 
    document.addEventListener('deviceready', this.onDeviceReady, false); 
    document.addEventListener('onCleverTapProfileSync', this.onCleverTapProfileSync, false); 
    document.addEventListener('onCleverTapProfileDidInitialize', this.onCleverTapProfileDidInitialize, false); 
    document.addEventListener('onCleverTapInAppNotificationDismissed', this.onCleverTapInAppNotificationDismissed, false); 
    document.addEventListener('onDeepLink', this.onDeepLink, false); 
    document.addEventListener('onPushNotification', this.onPushNotification, false); 
}, 
onDeviceReady: function() { 
    app.receivedEvent('deviceready'); 
    $rootScope.CleverTap = CleverTap; 
    CleverTap.notifyDeviceReady(); 
    CleverTap.registerPush(); 

}, 
onCleverTapProfileSync: function(e) { 
    console.log(e.updates); 
}, 
onCleverTapProfileDidInitialize: function(e) { 
    console.log(e.CleverTapID); 
}, 
onCleverTapInAppNotificationDismissed: function(e) { 
    console.log(e.extras); 
    console.log(e.actionExtras); 
}, 
onDeepLink: function(e) { 
    console.log(e.deeplink); 
}, 
onPushNotification: function(e) { 
    console.log(JSON.stringify(e.notification)); 
}, 
receivedEvent: function(id) { 
    var parentElement = document.getElementById(id); 
    console.log('parseElement', parentElement, id); 
    var listeningElement = parentElement.querySelector('.listening'); 
    var receivedElement = parentElement.querySelector('.received'); 

    listeningElement.setAttribute('style', 'display:none;'); 
    receivedElement.setAttribute('style', 'display:block;'); 

    console.log('Received Event: ' + id); 
}};app.initialize(); 

答えて

0

-

Setting Up Push Notifications for your app

ディープリンクを使用する予定の場合は、次のリンクを確認してください。

Setting up deep links

そしてあなたのJavascriptファイルから、CleverTapへのAPNトークンをプッシュする次のコードを使用 -

CleverTap.registerPush(); 

これはあなたに有用であったなら、私に教えてください。その他のご質問やご不明な点がある場合は、いつでもCleverTapのサポートチーム[email protected]までご連絡ください。

+0

プッシュ通知の初期化のサンプルコードを追加しました。お知らせ下さい。 – NitinD

+0

APN証明書もセットアップしましたか? –

+0

はい、しました。これがなければ、Clevertapの通知をプッシュするように登録することはできません。 – NitinD

関連する問題