Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7726205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:09:22+00:00 2026-06-01T05:09:22+00:00

I am developing an application for ios 5.1. I have now set up push

  • 0

I am developing an application for ios 5.1. I have now set up push notifications which can be sent from the Mac program “pushmebaby”.
My question is how can you send a push notification to all devices every time a RSS Feed gets a new entry (probably via PHP?)?

thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:09:23+00:00Added an answer on June 1, 2026 at 5:09 am

    From my understanding, you need to keep track of all the device ids (how? Personally I created a database). When the person first installs the app and signs up for the notification service, the app should send you the device id and username(some type of key) to your server.

    VB Sending push notifications ANPSLibrary this is just a function I created to sent push notifications, you need to call this function inorder to send the notification.

    Imports System.Net
    Imports System.IO
    Imports System.Text
    Imports System.Security.Cryptography.X509Certificates
    Imports System.Security.Cryptography
    Imports System.Net.Security
    Imports System.Net.Sockets
    Imports System.Threading
    Imports System.Linq
    Imports System.Collections.Generic
    Imports System.Runtime.Serialization
    Imports System
    
    
    
    
    
    Public Class PushNotification
    
    
    
        'Send PushNotifications
        '///sanbox is true, if we are developing, and false if we are out of developing
        '///testDeviceToken is the id of the device you want to send the push notfication to
        '///Message is the message we want the to send to the device
        '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        Public Shared Function sendrequest(ByVal sandbox As Boolean, ByVal testDeviceToken As String, ByVal Message As String)
    
            Dim strHost As String
            Dim strP12FileName As String
            Dim strP12FilePassword As String
            Dim strJsonMsg As String
            Dim certificate As X509Certificate2
            Dim certificateCollection As X509CertificateCollection
            Dim nPort As Integer = 2195
            Dim apnsClient As TcpClient
            Dim apnsStream As SslStream
    
    
            Try
                ' Sets the Host to the correct server. 
                '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                If sandbox = True Then
                    strHost = "gateway.sandbox.push.apple.com"
                Else
                    strHost = "gateway.push.apple.com"
                End If
    
    
                'The path of the certificate 
                '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                strP12FileName = "C:\Users\filelocation"
                strP12FilePassword = "password"
    
                'Putting Message in json format
                '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                strJsonMsg = "{""aps"":{""alert"":""" & Message & """,""badge"":1}}"
    
    
                certificate = New X509Certificate2(strP12FileName, strP12FilePassword)
                certificateCollection = New X509CertificateCollection
                certificateCollection.Add(certificate)
    
                'builds connection
                '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    
                apnsClient = New TcpClient(strHost, nPort)
                apnsStream = New SslStream(apnsClient.GetStream(), True, _
                                           New RemoteCertificateValidationCallback(AddressOf validateServerCertificate), _
                                            New LocalCertificateSelectionCallback(AddressOf selectLocalCertificate))
    
                apnsStream.AuthenticateAsClient(strHost, certificateCollection, System.Security.Authentication.SslProtocols.Ssl3, False)
    
                'Turns everything in Bytes
                '-------------------------------------------------------------------------------------------------------------------------
    
                'Cannot be more than Binary size of 32
                Dim DeviceToken((testDeviceToken.Length / 2) - 1) As Byte
                For i As Integer = 0 To 31
                    DeviceToken(i) = Byte.Parse(testDeviceToken.Substring(i * 2, 2), System.Globalization.NumberStyles.HexNumber)
                Next
    
    
                'Cannot be more than Binary size of 256
                Dim payload() As Byte = Encoding.UTF8.GetBytes(strJsonMsg)
    
                Dim DeviceTokenSize() As Byte = BitConverter.GetBytes(IPAddress.HostToNetworkOrder(Convert.ToInt16(DeviceToken.Length)))
                Dim payloadSize() As Byte = BitConverter.GetBytes(IPAddress.HostToNetworkOrder(Convert.ToInt16(payload.Length)))
    
                'Creates a Byte Array
                '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                Dim NotificationSize As Integer = 1 + DeviceTokenSize.Length + DeviceToken.Length + payloadSize.Length + payload.Length
                Dim Notification(NotificationSize) As Byte
    
                Notification(0) = 0
                Buffer.BlockCopy(DeviceTokenSize, 0, Notification, 1, DeviceTokenSize.Length)
                Buffer.BlockCopy(DeviceToken, 0, Notification, 1 + DeviceTokenSize.Length, DeviceToken.Length)
                Buffer.BlockCopy(payloadSize, 0, Notification, 1 + DeviceTokenSize.Length + DeviceToken.Length, payloadSize.Length)
                Buffer.BlockCopy(payload, 0, Notification, 1 + DeviceTokenSize.Length + DeviceToken.Length + payloadSize.Length, payload.Length)
    
                'Sends the Notification and closes and stream
                '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                apnsStream.Write(Notification)
                apnsStream.Close()
            Catch
    
    
    
    
            Finally
                'cleaning
                strHost = Nothing
                strP12FileName = Nothing
                strP12FilePassword = Nothing
                strJsonMsg = Nothing
                certificate = Nothing
                certificateCollection = Nothing
                nPort = Nothing
                apnsClient = Nothing
                apnsStream = Nothing
            End Try
            Return True
    
        End Function
        'This is needed for RemoteCertificateValidationCallback
        Public Shared Function validateServerCertificate(ByVal sender As Object, ByVal certificate As X509Certificate, ByVal chain As X509Chain, ByVal sslPolicyErrors As SslPolicyErrors)
    
            Return True 'Dont care about server's cert
    
        End Function
        'This is needed for LocalCertificateSelectionCallback
        Public Shared Function selectLocalCertificate(ByVal sender As Object, ByVal targetHost As String, ByVal localCertificates As X509CertificateCollection, _
            ByVal remoteCertificate As X509Certificate, ByVal acceptableIssuers As String())
    
            Dim certificate As X509Certificate2
            certificate = New X509Certificate2("C:\Users\filelocation", "password")
            Return certificate
    
        End Function
    
    End Class
    

    VB drive// essentially create a form, with 2 textboxs, one for input for the device token, and one for the message. then create the driver below

    Imports ANPSLibrary
    Public Class Form1
    
        Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    
        End Sub
    
        Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    
    
            PushNotification.sendrequest(True, txtToken.Text, txtMsg.Text)
        End Sub
    End Class
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I developing a Google Maps application for iOS. I have a problem. I sent
I am developing iPhone application which involves the frameworks available from iOS 3.2 (Core
Ok now I have a problem with the push notifications. I have set them
I am developing an IOS application, which uses web services (SOAP/WSDL). I have built
I have developing an iPhone application using xcode 4 which is compatible with iOS
I am developing an iOS application, and trying to zip the file I have
I'm developing an iOS 4 application. I have this ViewController: @interface BlogViewController : UIViewController
I'm developing an iOS 4 application. I have a main view that contains another
When developing on BlackBerry or iOS, you can deploy your application just by dropping
I'm been developing for iOS for about 6 months now and have an idea

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.