React-native-wechat: iOS 通过isWXAppInstalled判断设备是否安装微信 始终返回false 求大神指教

Created on 7 Dec 2017  ·  14Comments  ·  Source: yorkie/react-native-wechat

Most helpful comment

发现是在没有调用注册微信SDK情况下 [WXApi registerApp:appId],然后调用[WXApi isWXAppInstalled]导致原因

All 14 comments

同求

同求

RCT_EXPORT_METHOD(isWXAppInstalled:(RCTResponseSenderBlock)callback)
{
BOOL isInstall = false;
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"weixin://"]] ||
[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"wechat://"]] ||
[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb290293790992170://"]]){
isInstall = true;
}
callback(@[[NSNull null], @(isInstall)]);

// callback(@[[NSNull null], @([WXApi isWXAppInstalled])]);
}
我是暂时这么处理的

@heiheiLqq 这个试了下,添加进去后,也不能正确识别呢,如果微信没装显示false,但是装完后还是false

同求

我是android上也碰到这个问题:支付和登录都可以了,但是调用isWXAppInstalled却返回false

同求

发现是在没有调用注册微信SDK情况下 [WXApi registerApp:appId],然后调用[WXApi isWXAppInstalled]导致原因

+1

+1,这个问题怎么解决

白名单也加了,用canOpenURL也试了,都没有解决

同样的问题 请问您是怎么解决的!@SZT2014 @PopFisher @zhangleiwant @wuwen2333 @heiheiLqq @bing815

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shiguoqing picture shiguoqing  ·  8Comments

mengerzhuanyong picture mengerzhuanyong  ·  3Comments

eulo picture eulo  ·  4Comments

zhenlovezhen2012 picture zhenlovezhen2012  ·  5Comments

blade770 picture blade770  ·  7Comments