Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
227 views
in Technique[技术] by (71.8m points)

ios APP能不能打开微信然后通过微信跳转到指定的URL?

代码如下:

/**
 跳转到微信,并打开指定的URL

 @return <#return value description#>
 */
+(BOOL) openWeChat:(NSString *)url
{
    //wx0b577bb0399ff7d7
    NSString *headString = @"weixin://";
    
    headString =  [headString stringByAppendingString:url];
    BOOL canOpen = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"weixin:/"]];
    if(canOpen)
     //打开微信
    return [[UIApplication sharedApplication] openURL:[NSURL URLWithString:headString]];
        

    return FALSE;
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

不可行,虽然微信有打开webview的scheme,但是只有部分签约用户才能使用,需要带上appid的


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...