pushsharp

PushSharp doesn't send notifications

不打扰是莪最后的温柔 提交于 2019-12-05 23:29:31
问题 I have got a simple code: PushBroker pushBroker = new PushBroker(); string path = HttpContext.Current.Server.MapPath("~/" + AppSettings.CertificatePath); var appleCert = File.ReadAllBytes(path); pushBroker.RegisterAppleService( new ApplePushChannelSettings(AppSettings.IsProductionPushNotificationServer, appleCert, AppSettings.CertificatePassword)); var notification = new AppleNotification().ForDeviceToken(deviceToken.TrimStart('<').TrimEnd('>')) .WithBadge(unviewedInvitationCount); pushBroker

APN Production certificate not being recognized by PushSharp

淺唱寂寞╮ 提交于 2019-12-05 01:55:14
I've developed an iOS app, that receives Push Notifications. I'm sending them from a .NET environment using PushSharp. Everything went beautifully while developing, and the Pushs were successfully sent: var push = new PushBroker(); var appleCert = File.ReadAllBytes(@"Utils\Cert.Development.p12"); push.RegisterAppleService(new ApplePushChannelSettings(false, appleCert, "*******")); push.QueueNotification(new AppleNotification() .ForDeviceToken(token) .WithContentAvailable(1) ); push.StopAllServices(); Now, the app has been approved, and it's at AppStore. I have generate the correct production

Production certificate error in push notification - PushSharp

江枫思渺然 提交于 2019-12-04 20:53:04
My app was getting push notification when I used Enterprise account with following push notification certificate in production environment: Apple Production iOS Push Services Then in order to publish my app in App store, I started using app store account, no matter what I try, apple creates production certificate in following name: Apple Push Services Then from this SO , I came to know that Apple has changed its naming in certificate. My issue is, I am using Push Sharp in server side and getting below error: You have selected the Production server, yet your Certificate does not appear to be

Structuring GCM messages in PushSharp 4.0

别等时光非礼了梦想. 提交于 2019-12-04 17:56:20
I'm somewhat confused in how I'm supposed to structure the message body for a GCM push notification using PushSharp. The docs as well as the test files in the GitHub repo show what looks to be the message structure as this: broker.QueueNotification (new GcmNotification { RegistrationIds = new List<string> { regId }, Data = JObject.Parse ("{ \"somekey\" : \"somevalue\" }") }); I've been using Postman for testing in which I send a message in the following JSON format to https://gcm-http.googleapis.com/gcm/send . { "to": "000-0000-mytoken-foo", "notification" : { "title" : "Push Test Notification

how to validate Apple APN device token - WCF .NET

≡放荡痞女 提交于 2019-12-04 14:43:07
I am building a WCF REST web service that is called by the mobile app to insert the Apple device Token into the database. I would like to validate a device token before inserting into the database. Is there anyway to validate a device token to know if it is valid?? I have searched around the forum and could not find any sample code (in .NET) to do this, there were recommendations that I should use the Apple FeedBack service but how do I do that in .NET?? Could anyone please provide me a piece of sample code to validate an Apple Device Token in .NET. Many thanks, You can't validate the device

Pushsharp apple notification A call to SSPI failed error

与世无争的帅哥 提交于 2019-12-04 04:09:09
问题 I am using PushSharp to send Apple Push Notification in C# , i have my production .pem file and its password. Below is my code snippet.Am always getting this error .. "A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted-" OR "System.IO.IOException: Authentication failed because the remote party has closed the transport stream." I tried almost all codes available in net.Even tried MoonAPNS but same error,

PushSharp ApplePushService giving a Channel Exception

女生的网名这么多〃 提交于 2019-12-02 10:22:02
问题 I was able to send and receive push notification sucessfully for ios device, however now I am seeig this error: It appears after it seems to connect but the maximum attempts are reached then it tries to connect again and gives this error: I have used the same credentials before and after seeing these errors it successfully sends the notifications and I get them on my device. It seems to try to connect and then it reaches the maximum attempts and then it tries to connect again and gives this

PushSharp + Windows Phone deep linking on Toast Notifcation

梦想与她 提交于 2019-12-02 08:51:27
When using PushSharp with Windows Phone, I'm sending the notification with a deep link to a view in my app. push.QueueNotification(new WindowsPhoneToastNotification() .ForEndpointUri(new Uri(endpoint)) .ForOSVersion(WindowsPhoneDeviceOSVersion.Eight) .WithBatchingInterval(BatchingInterval.Immediate) .WithNavigatePath("/Views/DetailView.xaml") .WithParameter("slug", slug) .WithText1(text) .WithText2(message)); But when the toast appears and I touch it to open the app, the app opens to my default view instead of the requested DetailView. Shouldn't this open to my DetailView? You might want to

Pushsharp apple notification A call to SSPI failed error

岁酱吖の 提交于 2019-12-01 20:23:09
I am using PushSharp to send Apple Push Notification in C# , i have my production .pem file and its password. Below is my code snippet.Am always getting this error .. "A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted-" OR "System.IO.IOException: Authentication failed because the remote party has closed the transport stream." I tried almost all codes available in net.Even tried MoonAPNS but same error, For custom script also am getting this SSPI failure error. I use the same .pem file and run a php

PushSharp Apple - The message received was unexpected or badly formatted

霸气de小男生 提交于 2019-11-27 16:11:10
问题 I am using version 2.1.2 of PushSharp. The app is .NET 4.5.1 (although I have also tried targeting .NET 4.5 and .NET 4) I am trying but not succeeding to send push messages through the sandbox Apple APNS. I am successfully sending messages using a PHP script provided here on Ray Wenderlich's walkthrough using the same certificate and sending to the same device ID as for my PushSharp app. I have tested by exporting the completed cert as p12 from the key chain. Exporting the completed cert and