融云推送消息的发送机制

APP内运行的时候,不走通知机制

退出APP两分钟之内(没有杀死),状态栏上的是本地通知,走方法:

- (void)application:(UIApplication *)application
        didReceiveLocalNotification:(UILocalNotification *)notification 

}   

退出APP超出两分钟,但是APP,没有被杀死、冻结的时候,状态栏上的是远程通知,走方法:

- (void)application:(UIApplication *)application
        didReceiveRemoteNotification:(NSDictionary *)userInfo       

}

当APP被杀死,状态栏上的也算远程通知吧,走方法:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
// 远程推送的内容
   NSDictionary *remoteNotificationUserInfo = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey];

}

你可能感兴趣的:(融云推送消息的发送机制)