打开京东

京东打开对应商品以及跳转apptore地址   

 NSURL * jd_app_url = [NSURL URLWithString:@"openapp.jdmobile://"];
    NSURL *url;
    if([[UIApplication sharedApplication] canOpenURL:jd_app_url]) {
        NSString *urlString = @"openapp.jdmobile://virtual?params=%7B%22sourceValue%22:%220_productDetail_97%22,%22des%22:%22productDetail%22,%22skuId%22:%2210058164%22,%22category%22:%22jump%22,%22sourceType%22:%22PCUBE_CHANNEL%22%7D";
        url = [NSURL URLWithString:urlString];
        [[UIApplication sharedApplication]openURL:url];
    }else {
        //初始化AlertView
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"
                                                        message:@"尚未安装京东"
                                                       delegate:self
                                              cancelButtonTitle:@"取消"
                                              otherButtonTitles:@"确定",nil];

        //显示AlertView
        [alert show];
        
        NSString *urlString = @"https://itunes.apple.com/cn/app/%E4%BA%AC%E4%B8%9C-%E9%A6%96%E6%AC%A1%E8%B4%AD%E4%B9%B0%E5%8F%AF%E9%A2%86%E5%8F%96188%E5%85%83%E4%BC%98%E6%83%A0%E5%88%B8/id414245413?mt=8";
        url = [NSURL URLWithString:urlString];
        [[UIApplication sharedApplication]openURL:url];
    }
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值