当前位置:   article > 正文

ios 判断app 启动方式_ios 怎么区分是被第三发个app 拉起启动的

ios 怎么区分是被第三发个app 拉起启动的

-(BOOL)application: (UIApplication*)applicationdidFinishLaunchingWithOptions: (NSDictionary*)launchOptions{
  //Overridepointforcustomizationafterapplicationlaunch.//用户自己点击启动if(!launchOptions){
    NSLog(@"用户点击app启动");
  }else{
    NSURL*url=[
      launchOptionsobjectForKey: UIApplicationLaunchOptionsURLKey
    ];//app通过urlscheme启动if(url){
      NSLog(@"app 通过urlscheme启动 url = %@",
      url);
    }UILocalNotification*localNotification=[
      launchOptionsobjectForKey: UIApplicationLaunchOptionsLocalNotificationKey
    ];//通过本地通知启动if(localNotification){
      NSLog(@"app 通过本地通知启动 localNotification = %@",
      localNotification);
    }NSDictionary*remoteCotificationDic=[
      launchOptionsobjectForKey: UIApplicationLaunchOptionsRemoteNotificationKey
    ];//远程通知启动if(remoteCotificationDic){
      NSLog(@"app 通过远程推送通知启动 remoteCotificationDic = %@",
      remoteCotificationDic);
    }
  }returnYES;
}

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/125031
推荐阅读
相关标签
  

闽ICP备14008679号