Background Remote Notification <Silent Remote Notifications>
来源:互联网 发布:淘宝酒类授权书样子 编辑:程序博客网 时间:2024/04/29 15:29
IOS7.0 Silent Remote Notifications--->应用收到通知后在后台(background)状态下运行一段代码,可用于从服务器获取内容更新。功能使用场景:(多媒体)聊天,Email更新
服务器端如果只携带content-available: 1 不携带任何badge,sound 和消息内容等参数,则可以不打扰用户的情况下进行内容更新等操作即为“Silent Remote Notifications”。
客户端只需要确保课接收远程推送即可
回调都在方法中
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {}
注意点
应用在后台时 接收到推送后所可运行代码的时间是有限的,但可申请加长时间
当应用kill掉后 则无法运行代码
但如果开启了后代任务如 定位 定位到的位置同样会上报服务器(即时后台kill掉)
但是你的定位服务如果不是一直开启,而是定时器来控制开关状态则 只可以抓获到你移动的位置,当你不移动的时间是没有位置的,而如果一直开启定位而不关掉则 不移动的时间也可以抓获位置。
1 0
- Background Remote Notification <Silent Remote Notifications>
- iOS7中的多任务 - Background Fetch,Silent Remote Notifications,Background Transfer Service
- iOS7中的多任务 - Background Fetch,Silent Remote Notifications,Background Transfer Service
- iOS中的多任务: Background Fetch,Silent Remote Notifications,Background Transfer Service
- iOS开发-进阶:iOS7中的多任务 - Background Fetch,Silent Remote Notifications,Background Transfer Service
- iOS开发-进阶:iOS7中的多任务 - Background Fetch,Silent Remote Notifications,Background Transfer Service
- iOS 7 Background Remote Notification
- 5.iOS 7 Background Remote Notification
- Local and Remote Notifications
- Local/Remote Notification
- APNS - ios Remote Notification
- Remote Notification (一)
- Remote Notification (二)
- iOS开发-进阶:开启Remote notifications
- iOS7 Background Remote Notification(后台远程通知——静默push)
- 推送(远程Remote Notification)
- NSNotificationCenter/UILocalNotification/remote notification/notification center
- Local and Remote Notification Programming Guide
- Update和FixedUpdate的区别与共性
- 3
- Android开发之Android studio使用git(一)
- poj 2406 连续重复子串(后缀数组DC3/kmp)
- tjut 3543
- Background Remote Notification <Silent Remote Notifications>
- C#简单的方法调用
- java画动画
- servlet学习笔记
- 保存当前登录的用户
- Spring Batch_Configuring Skip Logic
- leetcode:greedy:Wiggle Subsequence(376)
- 代码笔记 | 一个用python实现的简单的文件服务器
- TypeScript 2.0 RC版的新特性