push notification handling

后端 未结 2 1433
梦谈多话
梦谈多话 2021-01-30 03:22

I\'m reading Apple\'s docs on

Handling Local and Remote Notifications

and it looks to me to have conflicting statements. Can someone clear up these confusion poi

2条回答
  •  遇见更好的自我
    2021-01-30 03:53

    As per iOS 9.1 scenario I have tested push notification in Kill mode where my application is not running in any mode at that time if I tap on push notification than the system will call first,

    - (void)application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
    
    //your code execution will here.
    
    }
    

    And second method call will be,

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    //Your initial code execution.
    
    }
    

    This scenario I have tested in my application.

提交回复
热议问题