From b4c4ec15baccf0ac525db054abc9acaacdd924b3 Mon Sep 17 00:00:00 2001 From: Jiang Hui Date: Mon, 9 Mar 2020 09:50:09 +0800 Subject: [PATCH] =?UTF-8?q?sendAuthRequest=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E8=B0=83=E7=94=A8[WXApi=20sendAuthReq]=20?= =?UTF-8?q?=E5=90=A6=E5=88=99app=20store=E5=AE=A1=E6=A0=B8=E4=B8=8D?= =?UTF-8?q?=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/RCTWeChat.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/RCTWeChat.m b/ios/RCTWeChat.m index 16494c8..88a15c2 100644 --- a/ios/RCTWeChat.m +++ b/ios/RCTWeChat.m @@ -173,7 +173,8 @@ RCT_EXPORT_METHOD(sendAuthRequest:(NSString *)scope callback(@[success ? [NSNull null] : INVOKE_FAILED]); return; }; - [WXApi sendReq:req completion:completion]; + UIViewController *rootViewController = [UIApplication sharedApplication].keyWindow.rootViewController; + [WXApi sendAuthReq:req viewController:rootViewController delegate:self completion:completion]; } RCT_EXPORT_METHOD(sendSuccessResponse:(RCTResponseSenderBlock)callback)