如何实现在Objective-C基于地理定位推送通知? [英] How to implement Push Notification Based on Geo Location in Objective-C?

查看:193
本文介绍了如何实现在Objective-C基于地理定位推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何实现基于地理位置信息的推送通知?结果
但我的解决办法是<一个href=\"http://stackoverflow.com/questions/15590655/how-to-use-geo-based-push-notifications-on-ios\">How在iOS使用基于地理位置的推送通知?

How to implement geo location based push notifications ?
But I have solution is How to use geo-based push notifications on iOS?

在上面的链接也被赋予基于本地的通知

In above link there are given local based notification

 UILocalNotification *localNotification = [[UILocalNotification alloc] init];
 localNotification.alertBody = locationData;
 localNotification.alertAction = @"Location data received";
 localNotification.hasAction = YES;
 [[UIApplication sharedApplication] presentLocalNotificationNow:localNotification];

但如何实现地缘位置 -
例如:一个用户进入一些区域则通知将要通过 APNS

推荐答案

基于地理的通知本地通知,他们不挂推(远程)的通知,并且不使用APNS。推送通知来自服务器,而基于地理的通知由手机知道它自己所处本地触发。如果你希望你的服务器需要注意的位置,你需要实现后台位置更新和数据发送到服务器自己

Geographic-based notifications are local notifications, they are not linked to push (remote) notifications, and do not use APNS. Push notifications come from a server, while geographic-based notifications are triggered locally by the phone knowing it's own position. If you want your server to be aware of the location, you need to implement background location updates and send the data to your server yourself

和使用<一个href=\"http://stackoverflow.com/questions/4152003/how-can-i-get-current-location-from-user-in-ios?lq=1\">How我可以从用户的iOS 获取当前位置和发送纬度和经度断绝。

And use this How can I get current location from user in iOS and sent latitude and longitude to sever.

请注意:应用程序应当公开,并在后台运行。

Note:App should be open and running on BackGround..

这篇关于如何实现在Objective-C基于地理定位推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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