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
Michael Flynn
@cblaze22
gcmBroker.QueueNotification(new GcmNotification
{
To = $"topics/{topicId}",
Data = JObject.FromObject(new { message })
});
Michael Flynn
@cblaze22
I need a forward slash at the beginning.
Gurbir Singh
@logicerp1993_twitter
Hello , I want to use P8 file using PushSharp version 2.2.1.0
Can you please help me and server hosted on window azure .
ethanransdellasr
@ethanransdellasr
Hi there... PushSharp/Xamarin newbie here... Does anyone have experience with using PushSharp and Xamarin forms? I can't even get the PS package to install because of an error saying the package doesn't contain assembly references or content files compatible with monoandroid v6.0... Any ideas?
Dan
@dgritsko
Hey, quick question -- what's the recommended lifecycle duration for a ServiceBroker object?
E.g., should I create an instance per platform and keep them for as long as my process is around, or should I create them each time I need to send a push notification?
It seems like they are meant to be long-lived, but I don't see anything in the documentation that specifically references this.
Looks like I need to keep it around as long as possible
eric556
@eric556

I tried installing PushSharp using the NuGet package manager in visual studio but I keep getting the error:

Could not install package 'PushSharp 4.0.10'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Am I doing something wrong? This is my first time trying to install packages in Xamarin so I don't really know what I'm doing

Jonathan "J." Tower
@jonathantower

I'm getting the dreaded SSPI/badly-formatted error when I run my application from a fully-updated Windows Server 2012 R2 server, but it works fine in my development environment. I've made sure that the certificates (and private keys) are installed on the local computer, not just for the current user, and that they permissions for the private keys are shared with the appropriate users.

Here's the error message:
PushSharp.Apple.ApnsNotificationException: Apns notification error: 'ConnectionError' ---> 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

Jonathan "J." Tower
@jonathantower
I've researched this for about a week and tried everything I could find on it, all to no avail. I'd appreciate any suggestions.
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