简体   繁体   English

识别网络上的iPhone OS并发送推送通知

[英]Identifying iPhone OS's on a Network and Sending Push Notifications

Can you identify devices on your network as an iPhone OS device easily? 您可以轻松地将网络上的设备识别为iPhone OS设备吗? Can you send push notifications to devices identified as using the iPhone OS on your network without aa target app? 您可以在没有目标应用程序的情况下将推式通知发送到被标识为在网络上使用iPhone OS的设备吗?

Is is possible to identify which devices on a network are using the iPhone OS? 是否可以识别网络上的哪些设备正在使用iPhone OS?

With this information, is it possible to send push notifications to these devices? 有了此信息,是否可以向这些设备发送推送通知?

From my understanding, your application server will contact APNs, which will contact the users. 据我了解,您的应用服务器将与APN联系,而APN将与用户联系。 So, the above would be impossible. 因此,以上是不可能的。 Can someone confirm this for me? 有人可以帮我确认一下吗?

If you look at the Apple's documentation for the UIDevice class : http://developer.apple.com/iphone/library/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html 如果您查看Apple的UIDevice类文档: http : //developer.apple.com/iphone/library/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html

For example, [[UIDevice currentDevice] model] wil give you strings like @”iPhone” and @”iPod touch”. 例如,[[UIDevice currentDevice]型号]将为您提供诸如@“ iPhone”和@“ iPod touch”之类的字符串。

Then in your App Delegate method "application:didRegisterForRemoteNotificationsWithDeviceToken:", you can store the device model with the device token on your server. 然后,在您的应用程序委托方法“ application:didRegisterForRemoteNotificationsWithDeviceToken:”中,可以将带有设备令牌的设备模型存储在服务器上。

You will be able to send push notification to a given model with that. 这样您就可以将推送通知发送到给定的模型。 If you use UrbanAirship, you could use the "tag" option. 如果您使用UrbanAirship,则可以使用“标签”选项。

As far as I know, iPhones don't announce their presence in a special way within the network. 据我所知,iPhone并没有以特殊方式宣布其在网络中的存在。 You might be able to guess what devices are iPhones on your local network by looking at the MAC address of responding hosts. 通过查看响应主机的MAC地址,您也许能够猜出本地网络上的iPhone是什么设备。

No, push notifications are delivered over an encrypted connection between iPhone and APN servers and always target a specific application on a device. 不可以,推送通知是通过iPhone和APN服务器之间的加密连接传递的,并且始终以设备上的特定应用为目标。 You're not able to send a push notification to arbitrary devices on your network (at least not without hacking the devices). 您无法将推送通知发送到网络上的任意设备(至少在没有黑客入侵设备的情况下)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM