Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Sending a push notification to specific id

$
0
0

Hi; I have 2 devices suscribed in a same channel: managers, i would like one to send to the other. I have tried these two solutions, each one of them not working. Where is my mistake ? using mavericks, ios8, Ti sdk 3.4

Cloud.PushNotifications.notify({
    channel: 'managers',
    payload: 'Welcome to push notifications',
    id:"one of the phones id"
}, function (e) {
    if (e.success) {
        alert('Success');
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});
Cloud.PushNotifications.notifyTokens({
    channel: 'managers',
    to_tokens: ["one of the phones id"],
    payload: 'Welcome Manager push notifications'
}, function (e) {
    if (e.success) {
        alert('Success');
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Viewing all articles
Browse latest Browse all 8068

Trending Articles



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