zoukankan      html  css  js  c++  java
  • 推送保存消息

    远程推送,在前台和后台时进入时 方法为  -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{

    在完全退出时走得方法为  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  //推送
        
        if (launchOptions) {
            NSDictionary *userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
            NSInteger type = [userInfo[@"type"] integerValue];
            NSString *notiContent = userInfo[@"aps"][@"alert"];
            NotifiCationDao *dao = [NotifiCationDao new];
            [dao addNotiWithContent:notiContent type:type];
            [[NSNotificationCenter defaultCenter]postNotificationName:kDidReceiveRemoteNotificationKey object:userInfo];
            
        }

  • 相关阅读:
    redis初步入门(2)
    redis初步入门(1)
    iOS9 中 alertView 的使用
    iOS应用 数据存储方式 (一)
    Python 选课系统
    Python 计算器
    Python ATM
    Python 购物车
    Python 城市列表
    Python 基础登入接口
  • 原文地址:https://www.cnblogs.com/huoxingdeguoguo/p/4818738.html
Copyright © 2011-2022 走看看