From afb8775379633476b9e22349e472ca4fac68a162 Mon Sep 17 00:00:00 2001 From: little-snow-fox Date: Mon, 30 Dec 2019 20:01:25 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E6=95=B4=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/build-setup-ios.md | 28 +++++++++++++++++++++------- package.json | 2 +- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/docs/build-setup-ios.md b/docs/build-setup-ios.md index 4bbf6c7..eafe5d9 100644 --- a/docs/build-setup-ios.md +++ b/docs/build-setup-ios.md @@ -57,13 +57,13 @@ Universal Links 配置文件, 没使用的话可以忽略。 ```objc #import -// ios 8.x or older -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url -sourceApplication:(NSString *)sourceApplication annotation:(id)annotation -{ - [RCTLinkingManager application:application openURL:url options:options]; - return [WXApi handleOpenURL:url delegate:self]; -} +// ios 8.x or older 不建议再使用这段配置,所以注释掉 +// - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url +// sourceApplication:(NSString *)sourceApplication annotation:(id)annotation +// { +// [RCTLinkingManager application:application openURL:url options:options]; +// return [WXApi handleOpenURL:url delegate:self]; +// } // ios 9.0+ - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url @@ -75,3 +75,17 @@ sourceApplication:(NSString *)sourceApplication annotation:(id)annotation return [WXApi handleOpenURL:url delegate:self]; } ``` +## 3. Then copy the following in `AppDelegate.h`: +``` +#import +#import +#import "WXApi.h" + +@interface AppDelegate : UIResponder + +@property (nonatomic, strong) UIWindow *window; + +@end +``` +Mainly need to add '#import "WXApi.h"' and 'wxapidelegate'. +主要是需要加上 '#import "WXApi.h"' 和 'WXApiDelegate' 。 \ No newline at end of file diff --git a/package.json b/package.json index 5316906..14eeccd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-wechat-lib", - "version": "1.1.11", + "version": "1.1.12", "description": "react-native library for wechat app. 支持分享和拉起小程序。", "main": "index.js", "scripts": {