4.极光推送解释的iOS本地通知
来源:互联网 发布:php 空格占位符 编辑:程序博客网 时间:2024/05/22 05:14
IOS 设备收到一条本地通知,用户点击通知打开应用时,应用程序根据状态不同进行处理需在 AppDelegate 中的以下两个方法中添加代码以获取本地通知内容
- 如果 App 状态为未运行,此函数将被调用,如果launchOptions包含UIApplicationLaunchOptionsLocalNotificationKey表示用户点击本地通知导致app被启动运行;如果不含有对应键值则表示 App 不是因点击本地通知而被启动,可能为直接点击icon被启动或其他。
- (BOOL)application:(UIApplication *)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions;
// 本地通知内容获取:
NSDictionary *localNotification = [launchOptionsobjectForKey:UIApplicationLaunchOptionsLocalNotificationKey]
- 如果 App状态为正在前台或者后台运行,那么此函数将被调用,并且可通过AppDelegate的applicationState是否为UIApplicationStateActive判断程序是否在前台运行。此种情况在此函数中处理:
- (
void
)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification;
// 本地通知为notification
0 0
- 4.极光推送解释的iOS本地通知
- iOS 极光推送接收通知
- IOS本地推送通知
- IOS 本地推送通知
- iOS 本地推送通知
- iOS 的本地通知知识的解释
- IOS 本地推送通知方法
- ios推送:本地通知UILocalNotification
- ios推送:本地通知UILocalNotification
- ios推送:本地通知UILocalNotification
- ios推送:本地通知UILocalNotification
- ios推送:本地通知UILocalNotification
- iOS 本地推送通知 UILocalNotification
- ios推送:本地通知UILocalNotification
- iOS推送:本地通知UILocalNotification
- iOS推送:本地通知UILocalNotification
- iOS推送:本地通知UILocalNotification
- iOS开发推送本地通知
- Linux下3G初始化与拨号连接问题
- AndroidStudio遇到奇葩SVN问题的解决方案
- 欢迎使用CSDN-markdown编辑器
- Qt Style Sheet(四) --- Customizing Qt Widgets Using Style Sheets
- 面试题:23从上往下打印二叉树
- 4.极光推送解释的iOS本地通知
- 堆和栈的区别
- php需要具备的知识
- [leetcode-32]Longest Valid Parentheses(java)
- 5.iOS 7 Background Remote Notification
- Qt Style Sheet(五) --- QTextTable Class Reference
- HTTP上传文件至服务器
- 【SVN问题,切换SVN用户】记下解决方法
- iOS UIFont 字体名字大全