美文网首页
应用间跳转

应用间跳转

作者: 温水煮青蛙a | 来源:发表于2017-12-29 18:08 被阅读0次
打开设置对应
NSArray *array = @[@{@"系统设置":@"prefs:root=INTERNET_TETHERING"},@{@"WIFI设置":@"prefs:root=WIFI"},@{@"蓝牙设置":@"prefs:root=Bluetooth"},@{@"系统通知":@"prefs:root=NOTIFICATIONS_ID"},@{@"通用设置":@"prefs:root=General"},@{@"显示设置":@"prefs:root=DISPLAY&BRIGHTNESS"},@{@"壁纸设置":@"prefs:root=Wallpaper"},@{@"声音设置":@"prefs:root=Sounds"},@{@"隐私设置":@"prefs:root=privacy"},@{@"APP Store":@"prefs:root=STORE"},@{@"Notes":@"prefs:root=NOTES"},@{@"Safari":@"prefs:root=Safari"},@{@"Music":@"prefs:root=MUSIC"},@{@"photo":@"prefs:root=Photos"}];
 NSURL * url = [NSURL URLWithString:[array[0] allValues].firstObject];
[[UIApplication sharedApplication]openURL:url];




应用间跳转
AppDelegate
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication annotation:(id)annotation NS_DEPRECATED_IOS(4_2, 9_0, "Please use application:openURL:options:") __TVOS_PROHIBITED

{
    NSLog(@"~~~~~~%@", [url scheme]);
    
NSLog(@"----aaa-----%@", [url host
]);//打印1234
    
NSLog(@"======%@", [url resourceSpecifier
]);//打印//1234
    
    
if ([[url scheme] isEqualToString:@"aaaa"
])
    {
        
NSLog(@"%@"
,url);
    }
    
return YES
;
}

跳转方法
bbbb跳转app的标识 URL Schemes 
: 比加   就是这个格式  
//1234 携带过去的参数  用于判断是谁打开的app
NSString *url = [NSString stringWithFormat:@"bbbb://1234"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];







//////////////////提示用户更新    跳转到appStore
 NSString *num1 = @"5.2.0";//APP版本
    NSString *num2 = @"5.3.0";//请求接口版本
    
    if ([num1 compare:num2 options:NSNumericSearch] == NSOrderedDescending)
    {
        NSLog(@" 降序");
    }else if ([num1 compare:num2 options:NSNumericSearch] == NSOrderedSame){
        NSLog(@" 相等");
    }else if ([num1 compare:num2 options:NSNumericSearch] == NSOrderedAscending){
        NSLog(@" 升序");
更新app
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
    }
解释:
NSOrderedDescending是降序,num1>num2
NSOrderedSame是相等,num1=num2
NSOrderedAscending是升序,num1<num2





相关文章

  • 应用程序间跳转

    应用程序间跳转 1. 什么是应用间跳转,有什么作用? 2. 应用程序间跳转实现? 直接打开对应APP的scheme...

  • 应用间跳转(Swift)

    一.应用跳转的介绍 1.应用间跳转即从一个应用程序跳转到另一个应用程序 2.应用间跳转的应用:1.应用推荐2.支付...

  • 应用程序间跳转和社交分享

    一. 应用程序间跳转 1. 什么是应用间跳转,有什么作用? 2. 应用程序间跳转实现? 直接打开对应APP的sch...

  • 应用间跳转

    iOS 9.0之后 应用程序跳转 需要设置白名单info.plist 增加 LSApplicationQueri...

  • 应用间跳转

    应用间跳转 应用场景使用第三方用户登录,需要用户授权,还需要“返回到调用的程序,同事返回授权的用户名”应用程序推广...

  • 应用间跳转

  • 应用间跳转

    本文简单介绍iOS应用程序互相跳转的方法 2.要打开本机上的其他应用程序,需要设置schemes,自定义的协议头,...

  • 应用间跳转

    实现应用间的跳转 从demo1到demo2,首先设置demo2 的 URL schme:设置路径 tagert -...

  • 应用间跳转

    // 1.获取到对应应用程序的URL NSURL *wechatURL = [NSURL URLWithStrin...

  • 11-UI补充(2)

    0813-应用跳转、社交分、享推送通知 应用跳转 要点(04-应用间跳转跳转到固定界面和返回应用程序) 流程:...

网友评论

      本文标题:应用间跳转

      本文链接:https://www.haomeiwen.com/subject/ficwgxtx.html