ChatSecure Push Notifications

2016-08-22

Ein Xmpp Client unter iOS ohne Push Notification ist für mich in der Praxis nicht zu gebrauchen. Damit die Push Notifications mit ChatSecure funktionieren, benötigt man einen Xmpp Account auf einem Server der XEP-0357 unterstützt. Soweit der Plan. In der Praxis hat das - zumindest für mich - natürlich nicht funktioniert.

Durch Zufall habe ich herausgefunden, das die Push Notifications funktionieren, wenn man eine zweite Resource mit negativer Priorität anmeldet. Eine negative Priorität wird normalerweiße für nicht-menschliche Teilnehmer verwendet.

npm install node-xmpp-client
var Client = require("node-xmpp-client");
var client = new Client({
    jid: '<your jid>/dummy',
    password: '<your password>',
    reconnect: true
});

client.on('online', function(data) {
    client.connection.socket.setTimeout(0);
    client.connection.socket.setKeepAlive(true, 10000);
    console.log('Connected as ' + data.jid.local + '@' + data.jid.domain + '/' + data.jid.resource);
    client.send(new Client.Stanza('presence', {})
        .c('show').t('away').up()
        .c('priority').t('-1')
    );
});

29.08.2016

Mir ist unklar, ob mein Xmpp Provider etwas rum geschraubt hat oder ob das letzte iOS Update (9.3.5) etwas zerissen hat. Aktuell funktionieren Push Notifications mit ChatSecure nicht mehr.

Ich gebe es auf, “freie” Xmpp Client’s unter iOS sind einfach nicht zu gebrauchen.