0

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?

  • Can you verify port 2195 is open by making a telnet connection? I would expect that to throw an error but I have a console version and when I closed the port the app just hung -- no error. – Mattio Apr 30 '15 at 19:47
  • yes, outgoing ports are not blocked. this works: telnet gateway.push.apple.com 2195 – Dextered May 04 '15 at 09:34
  • Hello bro , did you find a solution, am facing same problem on windows 10 ? – Nadeem Khoury Dec 25 '16 at 21:44

0 Answers0