PushSharp ApplePushChannel not connecting or sending

297 Views Asked by At

I'm trying to upgrade from APNS-Sharp 1.0.4.4 and I'm using the current NuGet Version 2.2.1.0

After registering all events, the channel and sending a notification, nothing happens. No event fires, even if I wait for minutes. A test with GCM two weeks ago worked, just the ios side seems to have problems.

code shortened:

        push = new PushBroker();
        push.OnServiceException += push_OnServiceException;
        // shortened.. all On* events registered here.
        push.OnDeviceSubscriptionExpired += push_OnDeviceSubscriptionExpired;

        push.RegisterAppleService(
            new ApplePushChannelSettings(
                config.Production,
                config.Certificate,
                config.CertPassword
            )
        );
...
        AppleNotification anot = new AppleNotification()
            .ForDeviceToken(token)
            .WithTag(id);
        if (alert != null) anot.WithAlert(alert);
        if (sound != null) anot.WithSound(sound);
        if (badge.HasValue) anot.WithBadge(badge.Value);
        if (custom != null) anot.WithCustomItem("cc", new object[1] { custom });
        notification = anot;
        push.QueueNotification(anot);
...
        Console.WriteLine("Press ENTER to stop server");
        Console.ReadLine();
...
        push.StopAllServices(true);

All the events write to a log if they're called, but none is called.

The Certificate works - I'm getting an error if I test it with the wrong password, none with the right.

If I try to send the same test Notification with APNS-Sharp and he same certificate/token, I receive it on the phone.

Any Ideas?

0

There are 0 best solutions below