Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 29 13:59
    RosenDev commented #934
  • Jun 22 16:35
    Build #28 passed
  • Jun 22 16:34
    Build #27 passed
  • Jun 22 16:34
    Build #27 passed
  • Jun 22 16:33
    Build #26 passed
  • Jun 22 16:32
    Build #26 passed
  • Jun 22 16:32
    Build #26 passed
  • Jun 22 16:31
    Build #26 passed
  • Jun 22 16:31
    Build #25 passed
  • Jun 22 16:30
    Build #24 passed
  • Jun 22 16:30
    dependabot[bot] labeled #940
  • Jun 22 16:30
    dependabot[bot] opened #940
  • Jun 22 16:30

    dependabot[bot] on nuget

    Bump Newtonsoft.Json from 7.0.1… (compare)

  • Jun 22 16:29
    Build #23 passed
  • Jun 22 16:29
    dependabot[bot] labeled #939
  • Jun 22 16:29
    dependabot[bot] opened #939
  • Jun 22 16:29

    dependabot[bot] on nuget

    Bump Newtonsoft.Json from 7.0.1… (compare)

  • Jun 22 16:29
    dependabot[bot] opened #938
  • Jun 22 16:29
    dependabot[bot] labeled #938
  • Jun 22 16:29

    dependabot[bot] on nuget

    Bump Newtonsoft.Json from 7.0.1… (compare)

S.Stratis
@spstratis
Can someone give me an idea on how to resend failed notifications that are caught by the exception events. For example when either of these exceptions are caught - GcmNotificationException/GcmMulticastResultException/RetryAfterException. Do I need to restart the broker in order to resend them or is it handled automatically.
I'm using 4.0
Adam J. Mendoza
@adammendoza
@Redth I've been away for a while. I'll take a look at the repo now
@SimonAntony Are you still working on this? Are you testing APNS or Google?
Adam J. Mendoza
@adammendoza
@SimonAntony for APSN I'd test the actual key apart from PushSharp to make sure all is good with the APNS and key. If that works then you should be able to receive notifications on a device
SimonAntony
@SimonAntony
Thanks @adammendoza - all working now and live
Federico Di Gregorio
@fogzot
Hi. Does PushSharp work with netcoreapp2.0 console applications?
Adam J. Mendoza
@adammendoza
@SimonAntony Did you migrate the code to dotnet core? If so is it on github?
sktyjd
@sktyjd
@SimonAntony did you have to make any changes to the codebase to get it to work with APSN?
SimonAntony
@SimonAntony
@adammendoza no just used what was in the repo
@sktyjd Nope, found a couple of examples on the net so used as a basis
Paul Arizpe
@kiramishima
Hi, how can use .p8 certificate with PushSharp ?? anyone have a Example :D
(PushSharp.Core)
Adam J. Mendoza
@adammendoza
@SimonAntony Cool! does that mean that it works with dotnet core as is?
sourceship13
@sourceship13
Hey guys, I just ran across this library. I just cloned it, how can i send a test message to a dev device. I know its a silly question, im just not sure how to start building into this
moutabreath
@moutabreath
Hi guys. I'm having a problem validating my certificate to APNS with this nuget. My certificate works when using PHP and when using Sockets. Couldn't find anything on the web
Alex P
@SanSYS
Hi there! Are the project alive?
last commit at 1 Dec 2016
Unfortunately Redth/PushSharp#702 http/2 not supported yet =(
Joshua Russo
@rupe120
@SanSYS The project is still alive I believe. The primary maintainer (Redth) is just not working on a project where he needs push notifications, so his attention is pulled else where
CohenINT
@CohenINT
hello, i want to build an app that is get push notification question, how do i start?
Jek
@jekcom
Hi All. Seems like APNS does not support tls1.2, is that true?
baluleo
@baluleo
I tried to install PushSharp 4.0.10 Nuget package in Visual Studio 2017, it shows error: Package restore failed. Rolling back package changes for 'Project1'. How to resolve this issue? 0
seecoolguy
@seecoolguy
To begin building a push notification app, try a tutorial like:
Ray Wenderlench
Ajay Kumar
@ajayetw2009_twitter
I have installed PushSharp 4.0.10 Nuget package in Visual Studio 2017 and I have only enable TLS 1.2 (Means A+ rating on server) then i don't get apns notification on server and when i have enable TLS 1.0 with TLS 1.2 then notification is working. please help me how can I get apns notification when only TLS 1.2 enable.
Khilborn
@Khilborn
I downloaded this library. What do you need to actually send a push notification to a phone? Do I need a service? Where do I get "GCM-SENDER-ID" and "AUTH-TOKEN"? Just not really sure how to use it.
seecoolguy
@seecoolguy
Try the early tutorials: https://redth.codes/pushsharp-3-0-the-push-awakens/ on google things changed a bit with fire base but you have options of users subscribing to a feed like a basket ball score or personal notifications.
@ajayetw2009_twitter
Are your certs correct?
ericshiny
@ericshiny
guys, new to here. i want to ask one compatibility issue which i met on Mac OS 10.13
for 10.12 systems, the system notification can be displayed.
but for 10.13 systems, the system notification cannot be displayed.
i have checked the system preference setting in the OS.
but still cannot work.
btw, we can see the badge number is trigerred by APNs on 10.13.
i have also installed an app "Slack" on the 10.13. and checked the notification center works fine .
ericshiny
@ericshiny
so i think maybe there maybe some compatibility issue for pushsharp??
dongkale
@dongkale
please update... ServiceBroker.Stop() function timeout version
public void Stop( int millisecondsTimeout, bool immediately = false )
{
if( !running )
throw new OperationCanceledException( "ServiceBroker has already been signaled to Stop" );
        running = false;

        notifications.CompleteAdding();

        lock( lockWorkers )
        {
            // Kill all workers right away
            if( immediately )
                workers.ForEach( sw => sw.Cancel() );

            var all = ( from sw in workers
                        select sw.WorkerTask ).ToArray();

            Log.Info( "Stopping: Waiting on Tasks" );

            Task.WaitAll( all, millisecondsTimeout );

            Log.Info( "Stopping: Done Waiting on Tasks" );

            workers.Clear();
        }
    }
gustavo-sombra
@gustavo-sombra
Hi guys, nice to join this chat room. I would like to ask you to all of you if someone has been succeded implementing iOS Push Notifications on a C# Server pointing to the Apple's new http/2 APNS API. I've been doing research about some libraries or code snippets and I haven't found anything straighforward or easy to use. I'm a Developer focused on Java but the server which sends the Notifications to iOS is made in .NET ; Does somebody succeeded doing this? Thank you! Regards!
PD: @Redth you must be really busy for sure even to see this, but it would be great to hear if it would be more progress on your GitHub apns-http2 branch, as well as if you have found some help for finishing this. Thank you!
Jonathan Dick
@Redth
Sorry but SslStream doesn't support ALPN so it's not practical to implement HTTP/2
I have no plans to work on this. Use Azure.
Paul Arizpe
@kiramishima
Hi, I try send notification to apple devices, but I get this error:
2018-07-31 13:08:25.PM [DEBUG] Scaled Changed to: 1
2018-07-31 13:08:25.PM [INFO] Stopping: Waiting on Tasks
2018-07-31 13:08:25.PM [INFO] Waiting on all tasks 1
2018-07-31 13:08:26.PM [INFO] APNS-Client[1]: Sending Batch ID=1, Count=1
2018-07-31 13:08:26.PM [INFO] APNS-Client[1]: Connecting (Batch ID=1)
2018-07-31 13:08:26.PM [ERROR] APNS-CLIENT[1]: Send Batch Error: Batch ID=1, Error=PushSharp.Apple.ApnsConnectionException: SSL Stream Failed to Authenticate as Client ---> System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.Ss
exist any solution ??
My code is:
```
var config = new ApnsConfiguration(ApnsConfiguration.ApnsServerEnvironment.Production,
@"C:\Users\kiram\Downloads\tfrwebprodcert.pem", "TFRweb2018");
        var apnsBroker = new ApnsServiceBroker(config);

        // Wire up events
        apnsBroker.OnNotificationFailed += (notification, aggregateEx) => {

            aggregateEx.Handle(ex => {

                // See what kind of exception it was to further diagnose
                if (ex is ApnsNotificationException)
                {
                    var notificationException = (ApnsNotificationException)ex;

                    // Deal with the failed notification
                    var apnsNotification = notificationException.Notification;
                    var statusCode = notificationException.ErrorStatusCode;

                    Console.WriteLine($"Apple Notification Failed: ID={apnsNotification.Identifier}, Code={statusCode}");

                }
                else
                {
                    // Inner exception might hold more useful information like an ApnsConnectionException            
                    Console.WriteLine($"Apple Notification Failed for some unknown reason : {ex.InnerException}");
                }

                // Mark it as handled
                return true;
            });
        };

        apnsBroker.OnNotificationSucceeded += (notification) => {
            Console.WriteLine("Apple Notification Sent!");
        };

        // Start the broker
        apnsBroker.Start();

        // Queue a notification to send
        apnsBroker.QueueNotification(new ApnsNotification
        {
            DeviceToken = "c25b43afacd7ed3d496eca80b89c9f248983e5d0ec385b3b6237f0cbbd0b4e51",
            Payload = JObject.Parse("{\"aps\":{\"badge\":7}}")
        });

        // Stop the broker, wait for it to finish   
        // This isn't done after every message, but after you're
        // done with the broker
        apnsBroker.Stop();
I try with p12 file too, but i get the same error XD
S.Stratis
@spstratis
@Redth Any plans of pushing the new code that has the merged pull requests out to Nuget?
Dave C
@daveathurree
hi, I have a query about the OnNotificationSucceeded handler. Inside here I increment a counter to keep track of how many notifications have been sent. My code flow looks like: 1. Setup ApnsBroker 2. Start broker 3. Queue 5 notifications. 4. Stop broker - My expectation that the broker will not stop until all service workers have finished, thus the counter will have incremented 5 times at this point. 5. Save send count to the database.