WebKit.frameworkSystemConfiguration.frameworkCoreTelephony.frameworklibsqlite3.0libc++libz
Add your app ID as a "URL Scheme" under "URL Types" in your target's Info tab. See the screenshot below:
This is required for WeChat to return to your app.
On iOS 9+, add `wechat`, `weixin`, and `weixinULAPI` to `LSApplicationQueriesSchemes` in your `Info.plist`:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>wechat</string>
<string>weixinULAPI</string>
</array>This is required to allow your app to open the WeChat app.
This handles the callbacks from WeChat.
#import <React/RCTLinkingManager.h>
#import "WXApi.h"
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
return [WXApi handleOpenURL:url delegate:self];
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
options:(NSDictionary<NSString*, id> *)options
{
// Triggers a callback event.
[RCTLinkingManager application:application openURL:url options:options];
return [WXApi handleOpenURL:url delegate:self];
}
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void(^)(NSArray<id<UIUserActivityRestoring>> * __nullable
restorableObjects))restorationHandler {
// Required for Universal Links
[RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
return [WXApi handleOpenUniversalLink:userActivity
delegate:self];
}Note: Universal Links are required for receiving callbacks after a successful payment.
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
#import "WXApi.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate, WXApiDelegate>
@property (nonatomic, strong) UIWindow *window;
@endCopy /ios/libWeChatSDK.a from this project to your Xcode project's root directory and add it to your target's "Link Binary with Libraries" build phase. Refer to the example project for details.
