Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. iOS
  4. Not able to receive notifications on device

Not able to receive notifications on device

Scheduled Pinned Locked Moved iOS
csharpsecurityasp-netioslinq
3 Posts 3 Posters 8 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11690624
    wrote on last edited by
    #1

    Hi,

    We are using Push Sharp library in VB .Net for sending notifications to iOS device but we arent able to receive notifications on our device.
    Code is included below. We have checked the handshake using openSSL and thats also working properly. Please let us know whats wrong in the code.

    ------- Imports System.Data.SqlClient Imports System.Data Imports System.Linq Imports System.Web Imports System.Net.Security Imports PushSharp Imports PushSharp.Apple Imports System.Security.Authentication Imports System.Net.Sockets Imports System.Security.Cryptography.X509Certificates Imports System.Configuration Imports Newtonsoft.Json Imports System.IO Imports System.Collections.Generic Imports System.Net Imports PushSharp.Core Partial Class mobile_app_notification_list Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim push As New PushBroker() push = New PushBroker() Dim cert As New ApplePushChannelSettings(True, File.ReadAllBytes(String.Format("C:\Websites\mobileapp.sanjeevkapoor.com\PushAppSanjeev.p12")), "pass@123") Dim settings As New PushServiceSettings() settings.AutoScaleChannels = False settings.Channels = 3 settings.MaxAutoScaleChannels = 3 push.RegisterAppleService(cert, settings) push.QueueNotification(New AppleNotification().ForDeviceToken("6d9471a58384af100a0b854ec907729efb6c5334e4c26822e97eaccc6d48313d").WithAlert("Hello World!").WithBadge(1).WithSound("default")) 'push.StopAllServices(True) Response.Write("notification sent successfully") Catch ex As Exception Response.Write(ex.Message) End Try End Sub -------

    D 3 2 Replies Last reply
    0
    • U User 11690624

      Hi,

      We are using Push Sharp library in VB .Net for sending notifications to iOS device but we arent able to receive notifications on our device.
      Code is included below. We have checked the handshake using openSSL and thats also working properly. Please let us know whats wrong in the code.

      ------- Imports System.Data.SqlClient Imports System.Data Imports System.Linq Imports System.Web Imports System.Net.Security Imports PushSharp Imports PushSharp.Apple Imports System.Security.Authentication Imports System.Net.Sockets Imports System.Security.Cryptography.X509Certificates Imports System.Configuration Imports Newtonsoft.Json Imports System.IO Imports System.Collections.Generic Imports System.Net Imports PushSharp.Core Partial Class mobile_app_notification_list Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim push As New PushBroker() push = New PushBroker() Dim cert As New ApplePushChannelSettings(True, File.ReadAllBytes(String.Format("C:\Websites\mobileapp.sanjeevkapoor.com\PushAppSanjeev.p12")), "pass@123") Dim settings As New PushServiceSettings() settings.AutoScaleChannels = False settings.Channels = 3 settings.MaxAutoScaleChannels = 3 push.RegisterAppleService(cert, settings) push.QueueNotification(New AppleNotification().ForDeviceToken("6d9471a58384af100a0b854ec907729efb6c5334e4c26822e97eaccc6d48313d").WithAlert("Hello World!").WithBadge(1).WithSound("default")) 'push.StopAllServices(True) Response.Write("notification sent successfully") Catch ex As Exception Response.Write(ex.Message) End Try End Sub -------

      D Offline
      D Offline
      Dennis E White
      wrote on last edited by
      #2

      This question would probably be better answered on the Visual Basic forum. http://www.codeproject.com/Forums/1646/Visual-Basic.aspx[^] As just a note though you still have to have an app that will consume and deal with those notifications. Have you checked the app to make sure that you have it configured and coded properly to received the notifications?

      1 Reply Last reply
      0
      • U User 11690624

        Hi,

        We are using Push Sharp library in VB .Net for sending notifications to iOS device but we arent able to receive notifications on our device.
        Code is included below. We have checked the handshake using openSSL and thats also working properly. Please let us know whats wrong in the code.

        ------- Imports System.Data.SqlClient Imports System.Data Imports System.Linq Imports System.Web Imports System.Net.Security Imports PushSharp Imports PushSharp.Apple Imports System.Security.Authentication Imports System.Net.Sockets Imports System.Security.Cryptography.X509Certificates Imports System.Configuration Imports Newtonsoft.Json Imports System.IO Imports System.Collections.Generic Imports System.Net Imports PushSharp.Core Partial Class mobile_app_notification_list Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim push As New PushBroker() push = New PushBroker() Dim cert As New ApplePushChannelSettings(True, File.ReadAllBytes(String.Format("C:\Websites\mobileapp.sanjeevkapoor.com\PushAppSanjeev.p12")), "pass@123") Dim settings As New PushServiceSettings() settings.AutoScaleChannels = False settings.Channels = 3 settings.MaxAutoScaleChannels = 3 push.RegisterAppleService(cert, settings) push.QueueNotification(New AppleNotification().ForDeviceToken("6d9471a58384af100a0b854ec907729efb6c5334e4c26822e97eaccc6d48313d").WithAlert("Hello World!").WithBadge(1).WithSound("default")) 'push.StopAllServices(True) Response.Write("notification sent successfully") Catch ex As Exception Response.Write(ex.Message) End Try End Sub -------

        3 Offline
        3 Offline
        360musicng
        wrote on last edited by
        #3

        Having the same issues Views Album

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups