美文网首页
IOS 网页调用微信回调app

IOS 网页调用微信回调app

作者: 一个萝卜X个坑 | 来源:发表于2019-02-19 05:25 被阅读1次

URL Scheme 配置要和Referer 的值''5743xhb03479.xicp.io://'' 一样 才能返回 5743xhb03479.xicp.io:// 微信认为app从这里来的 回来的时候回到这个地方的app 不设置Referer微信会认为未知来源,会提示参数错误类似错误

        NSURL *httpUrl=[NSURL URLWithString:self.urlString];
        NSMutableURLRequest *httpRequest=[NSMutableURLRequest requestWithURL:httpUrl];
        [httpRequest addValue:@"5743xhb03479.xicp.io://" forHTTPHeaderField:@"Referer"];
        [self.web loadRequest:httpRequest];

相关文章

网友评论

      本文标题:IOS 网页调用微信回调app

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