我们可以把不使用的APN通知? [英] Can we push notification without using APNs?

查看:142
本文介绍了我们可以把不使用的APN通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能从我的第三方服务器直接推送通知到我的设备联网(无线网络)?我已经实现推通知设备符合的APN的帮助,但我的要求,而无需使用任何外部服务来实现相同的,说我的服务器和我的设备连接到企业内部网,我需要来检测设备的可用性内联网并直接发送通知。任何想法??在此先感谢

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

推荐答案

好吧,如果,因为它的声音 - 你开发企业应用程序,并没有去通过App Store,没有什么可以阻止你使用iOS的多任务处理4 API来模仿APNS的工作方式。基本上你怎么想接近它是注册您的应用程序为通过提供VoIP服务的 UIBackgroundModes Info.plist的键,这样系统会自动启动,并保持它在后台运行 - 然后有应用程序打开一个持久的IP连接到服务器,通过它您可以发送任何你喜欢的通知包。从那里,应用程序当然可以用 UILocalNotification 提醒通知的用户。

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.

注意,大部分是无效的,如果你必须去通过App Store,除非你的应用程序实际上是要提供VoIP服务。但既然你提到使用内部网,我想你会开发内部的东西,是企业开发人员中的一员计划,它允许你跳过整个App Store中的事情,自由使用SDK。

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.

这篇关于我们可以把不使用的APN通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆