Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we push notification without using APNs?

Is it possible to push notification from my 3rd party server directly to my device in Intranet(Wi-Fi)? I have achieved to push notification to the device with the help of APNs, but my requirement to achieve the same without using any external service, say my server and my device is connected to an Intranet, i need to detect the availability of the device in the Intranet and send notification directly. Any idea?? Thanks in advance

like image 285
pradeepa Avatar asked May 10 '11 04:05

pradeepa


People also ask

How do I send notifications to Apple Push Notification service (APNs)?

Transmit your remote notification payload and device token information to Apple Push Notification service (APNs). When you have a notification to send to a user, your provider must construct a POST request and send it to Apple Push Notification service (APNs).

Is it possible to send push notifications without GCM/FCM or APNs?

It is not possible to send a push notification without GCM/FCM or APNS service since at the operating system level, devices connect with those services. However, you can always use them as an API endpoint and send your push notifications without relying on a 3rd party.

How do I send a push notification to a user?

When you have a notification to send to a user, your provider must construct a POST request and send it to Apple Push Notification service (APNs). Your request must include the following information: For token-based authentication, your provider server’s current authentication token

Why do APNs take so long to reach the device?

A single APNs attempt may involve retries over multiple network interfaces and connections of the destination device. Often these retries span over some time period, depending on the network characteristics. In addition, a push notification may take some time on the network after APNs sends it to the device.


1 Answers

Well, if—as it sounds—you’re developing an enterprise app that doesn’t have to go through the App Store, there’s nothing to stop you using the iOS 4 multitasking APIs to mimic the way APNS works. Basically how you’d approach it is to register your app as providing VoIP services via the UIBackgroundModes Info.plist key—so the system launches it automatically and keeps it running in the background—and then have the app open a persistent IP connection to your server, via which you can send it whatever notification packets you like. From there, the app can of course use UILocalNotification to alert the user of the notification.

Note that most of this is void if you do have to go through the App Store, unless your app is actually going to provide VoIP services. But since you mention using an intranet, I assume you’ll be developing something in-house and are a member of the enterprise developer program, which allows you to skip the whole App Store thing and use the SDK freely.

like image 116
Noah Witherspoon Avatar answered Sep 20 '22 15:09

Noah Witherspoon