美文网首页
两个app之间跳转传值

两个app之间跳转传值

作者: 兔Hio | 来源:发表于2016-09-20 11:06 被阅读47次

两个app互相添加bundleID 额外的还要添加自己的bundleID。

判断NSURL *url = [NSURL URLWithString:@"com.LYY.App1://com.LYY.App1"];//通过openUrl进行跳转,可以传递一些参数                if ([[UIApplication sharedApplication] canOpenURL:url]) {                        [[UIApplication sharedApplication] openURL:url ];                    }else{            NSLog(@"应用程序未安装");            UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"应用程序未安装"message:@"确定下载应用吗?" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定",nil];

alertView.alertViewStyle = UIAlertViewStyleDefault;

[alertView show];

}

相关文章

网友评论

      本文标题:两个app之间跳转传值

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