mirror of
https://github.com/little-snow-fox/react-native-wechat-lib.git
synced 2025-12-06 15:26:49 +08:00
fix 修整说明文档
This commit is contained in:
parent
339ef1cdf5
commit
afb8775379
@ -57,13 +57,13 @@ Universal Links 配置文件, 没使用的话可以忽略。
|
|||||||
```objc
|
```objc
|
||||||
#import <React/RCTLinkingManager.h>
|
#import <React/RCTLinkingManager.h>
|
||||||
|
|
||||||
// ios 8.x or older
|
// ios 8.x or older 不建议再使用这段配置,所以注释掉
|
||||||
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
|
// - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
|
||||||
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
// sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
||||||
{
|
// {
|
||||||
[RCTLinkingManager application:application openURL:url options:options];
|
// [RCTLinkingManager application:application openURL:url options:options];
|
||||||
return [WXApi handleOpenURL:url delegate:self];
|
// return [WXApi handleOpenURL:url delegate:self];
|
||||||
}
|
// }
|
||||||
|
|
||||||
// ios 9.0+
|
// ios 9.0+
|
||||||
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
|
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
|
||||||
@ -75,3 +75,17 @@ sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
|||||||
return [WXApi handleOpenURL:url delegate:self];
|
return [WXApi handleOpenURL:url delegate:self];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
## 3. Then copy the following in `AppDelegate.h`:
|
||||||
|
```
|
||||||
|
#import <React/RCTBridgeDelegate.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "WXApi.h"
|
||||||
|
|
||||||
|
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate, WXApiDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIWindow *window;
|
||||||
|
|
||||||
|
@end
|
||||||
|
```
|
||||||
|
Mainly need to add '#import "WXApi.h"' and 'wxapidelegate'.
|
||||||
|
主要是需要加上 '#import "WXApi.h"' 和 'WXApiDelegate' 。
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-wechat-lib",
|
"name": "react-native-wechat-lib",
|
||||||
"version": "1.1.11",
|
"version": "1.1.12",
|
||||||
"description": "react-native library for wechat app. 支持分享和拉起小程序。",
|
"description": "react-native library for wechat app. 支持分享和拉起小程序。",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user