美文网首页
iOS对于webView跳转拼多多

iOS对于webView跳转拼多多

作者: Aldon丶 | 来源:发表于2019-09-29 13:21 被阅读0次

刚遇到的问题
通过抓包,发现跳转拼多多APP,需要对含有商品信息的URL做字符串替换的特殊处理,写在这里方便大家查阅。

if ([absoluteStr containsString:@"https://mobile.yangkeduo.com/"]){
        NSString *skipUrlStr = [absoluteStr stringByReplacingOccurrencesOfString:@"https://mobile.yangkeduo.com/" withString:@"pinduoduo://com.xunmeng.pinduoduo/"];
        NSURL *skipUrl = [NSURL URLWithString:skipUrlStr];
        [[UIApplication sharedApplication] openURL:skipUrl];
};

共勉。

相关文章

网友评论

      本文标题:iOS对于webView跳转拼多多

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