Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 25 18:15
    netwang commented #645
  • Aug 18 15:20
    nazarii-piontko closed #753
  • Jul 11 13:42
    spyro89 commented #870
  • Jul 11 13:26
    spyro89 commented #870
  • Jun 30 11:20
    tomkocyan commented #934
  • 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
Jonathan "J." Tower
@jonathantower

Well, I figured it out...sort of. I'm not sure what certificate minutia is at play here, but I created the signing request in Windows 10, signed it via the Apple dev site, downloaded and installed the cert into Win10. Everything with PushSharp worked there, but when I exported the Cert/Private Key combination and imported that into Windows 2012 R2, the same code and certificate did NOT work. I wonder if Win2012 is somehow less capable with certificate algorithms.

I got it to work by creating the signing request on MacOS, exporting that to a P12, and importing the P12 into Windows 10 and Windows 2012.

minafaw
@minafaw
Hi all
I am new to Xamarin but I am come from mobile application background
when I have a deep look at pushSharp , I figure they using GCM in android and this deprecated why you dont shift to firebase as its the new one
isfo
@isfo
Hi can anyone help me?
Im receiving: "Your Certificate does not appear to be issued by Apple! Please check to ensure you have the correct certificate!" on pushsharp 2.x
isfo
@isfo
problem solved! changed "Apple Production IOS Push Services" by "Apple Push Services" in ApplePushChannelSettings.cs
virender-singh
@virender-singh
hi all
In case of android, I am using the sample code and OnNotificationSucceeded event is getting executed but not getting any notification
even though if I pass invalid token on that time also OnNotificationSucceeded event is getting executed
I am able to get notification in case of IOS
virender-singh
@virender-singh
hi anyone is there?
YoniH
@YoniH
Hi, how did you convert the p8 file (downloaded from Apple's dev portal) to pem or pfx/p12?
I'm trying to load the p8 file some how to x509certificate2
mikecoram
@mikecoram
Any chance someone familiar with WNS and PushSharp could take a look at this issue? Redth/PushSharp#720 StackOverflow Question
I have PushSharp sending to both Android and iOS phone successfully but failing for Windows phones.
Parv
@parveshh
Hi i am using PushSharp in a new project and wondering if there is a way to inject servicebrokers? i could not find any documetation for this
TarrahArshad
@TarrahArshad
hi
is here body ?
i have a xamarin.forms project and server api in asp.net mvc . can i use pushsharp for communication between asp.net mvc api and app on android and ios ?
Stelios Ioannou
@stegiosioannou_twitter
Hey
Burhan UĞUR
@burhanugur
@Redth When are you going to accept pull requests?
Al Yaros
@alyaros
Hey, I have several millions of push request to send - How do I prevent the broker Queue to throw out-of-memory exception?
The internal blocking queue has unbounded capacity. for example I have stream of requests I would like to send, I take each element from the stream and enqueue it in the broker, the broker has unbounded capacity so eventually all my items will get into the broker memory cause it to ran out of memory. The broker is not fast as the incoming stream of requests. bottom line - how to throttle push sharp broker? I think that allowing library client to set bounded capacity on the broker queue would solve this issue.
Any Ideas?
Denis Ibragimov
@h0useRus
thats biggest problem of arhitecture of PushSharp 4, second version was much better with queue, I tried to play with Start/Stop for portion of messages, but then push sharp stopped send anything. My system with push sharp taking 5-10 gigs of memory during sending about ~7 mil messages per day, with version two it was only 700 megs!!! But version two do not support new Apple certificates.
levl289
@levl289
Let me start over... Is there a good way to make a collection of ServiceBrokers, which are actually concrete ApnsBroker and GCMBroker objects?
given the way generics are setup in PushSharp, it doesn't seem possible
I need to do this on account of multiple applications, as well as the ideally long-lived nature of the broker
Denis Ibragimov
@h0useRus
I did exactly like this and made base class
public abstract class PushChannelBase<T> : ISendChannel<MessageData>, IDisposable where T : INotification
    {
        protected static readonly Log log = Log.GetLogger<PushChannelBase<T>>();

        protected bool IsDisposed;
        protected readonly ServiceBroker<T> Broker;
        public virtual ChannelSetting[] Settings => ApplicationSettings.Settings;
        public ApplicationSetting ApplicationSettings { get; }
        public Guid ApplicationID => ApplicationSettings.ID;
        public string Name => ApplicationSettings.Name;
        public bool IsInitialized => Broker != null;

        public virtual ChannelResult SendData(IEnumerable<MessageData> data)
        {
            foreach (var message in data)
            {
                SendData(message);
            }
            return new ChannelResult { Status = StatusCodes.Success };
        }

        public abstract ChannelResult SendData(MessageData data);

        protected PushChannelBase(ApplicationSetting settings)
        {
            ApplicationSettings = settings;
            Broker = CreateBroker(settings);
            if (Broker == null)
                throw new NullReferenceException("Push service not initialized!");
            Broker.OnNotificationSucceeded += OnNotificationSuccess;
            Broker.OnNotificationFailed += OnNotificationFailed;
            Broker.Start();
        }

        protected abstract ServiceBroker<T> CreateBroker(ApplicationSetting settings);
        protected abstract void OnNotificationFailed(T notification, AggregateException exception);
        protected abstract void OnNotificationSuccess(T notification);

        protected virtual void OnError(int statusCode, MessageData data, Exception exception)
        {
            log.Error(exception);
            var response = new ResponseData
            {
                Code = statusCode,
                MessageID = data.ID,
                Message = exception.SerializeToJson(),
                By = data.UserID
            };
            SendProvider.SendStatus(response);
        }

        protected virtual void RegisterMessage(T notification, int errorCode, string errorMessage)
        {
            SendProvider.SendStatus(MakeResultResponse(notification, errorCode, errorMessage));
        }

        protected abstract ResponseData MakeResultResponse(T notification, int errorCode, string errorMessage);
        public virtual void Dispose()
        {
            if (!IsDisposed)
            {
                Broker?.Stop();
                IsDisposed = true;
            }
        }
    }
TarrahArshad
@TarrahArshad
hi all
is here for chat ?
levl289
@levl289
any examples of sending with PS directly w/o using a Broker?
we already have a queue mechanism, and I'm trying to keep our system as abstract WRT platforms as possible
levl289
@levl289
hrm, looks like the async part goes all the way to the bottom - not sure how useful it would be to send w/o a broker anyways...
Donnie7
@Donnie7
Hi. Can someone help me please? i would like to know if the Pushsharp can read .p8 certificates. If not, how can i read a .p8 certificate and convert it into a X509Certificate2?
It is quite urgent and i will accept all the help you can give me please.
By the way, i'm trying to use the communications with the APNs server.
Selçuk Ermaya
@se
Jonathan Dick
@Redth
woo figured out why mono debugging in vscode wasn’t hitting breakpoints set in the editor...
jay1050
@jay1050
Hi John. Now that ALPN is available in .net core 2.0 do you think we can progress this further. I am more than happy to put in my efforts alongside you and everyone else. I really hope we build the new version with support for proxy
SimonAntony
@SimonAntony
Hi All - trying to get the tests running but they fail as there is no settings.json file and the project references a ghost file. Anyone got a sample I can use? Trying to work out how to integrate this library into an existing dotnet project to send notifications to ipads. thnx
btw i've got the sample, just not sure what should go in it ;-)
msadikkose
@msadikkose
Hi All, I m trying to push over 500 K notification, but it takes over 10 minutes in v4.0 while with v2.0 it takes 2-3 minutes over all.
I tried to change scale up to 50 or keep it 10 and increase the thread - task count but could not decrease the time elapsed.
Application is run on 8 Gb, 2.3 Ghz server.
Do you have any suggestions ?
Thank you!
SimonAntony
@SimonAntony
@Redth Got a working codebase now :-) - one more question (if anyone is listening?), how do I actually test this is sending out? The logs say notification sent, however the app dev says nothing is being received - is there a way I can test this locally to ensure it's working?
Bono Pomodoro
@BonoPomodoro_twitter
Hey guys, does anyone have an example of usage of PushSharp for Xamarin Forms? For all three platforms :)
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