Commit 2bcacf87091bf8a83054ec6997dc196aa2ddf49b

Authored by xiaoyu
1 parent ed253529

添加微信sdk需要的一些回调和工程配置

ios/Runner.xcodeproj/project.pbxproj
... ... @@ -2310,7 +2310,6 @@
2310 2310 CLANG_ENABLE_MODULES = YES;
2311 2311 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
2312 2312 CODE_SIGN_STYLE = Manual;
2313   - CURRENT_PROJECT_VERSION = 4;
2314 2313 DEVELOPMENT_TEAM = "";
2315 2314 "DEVELOPMENT_TEAM[sdk=iphoneos*]" = T8P9KW8GWH;
2316 2315 ENABLE_BITCODE = NO;
... ... @@ -2319,7 +2318,6 @@
2319 2318 "$(inherited)",
2320 2319 "@executable_path/Frameworks",
2321 2320 );
2322   - MARKETING_VERSION = 1.0.3;
2323 2321 OTHER_CFLAGS = (
2324 2322 "-DNDEBUG",
2325 2323 "'-std=gnu99'",
... ... @@ -2657,7 +2655,6 @@
2657 2655 CLANG_ENABLE_MODULES = YES;
2658 2656 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
2659 2657 CODE_SIGN_STYLE = Manual;
2660   - CURRENT_PROJECT_VERSION = 4;
2661 2658 DEVELOPMENT_TEAM = "";
2662 2659 "DEVELOPMENT_TEAM[sdk=iphoneos*]" = T8P9KW8GWH;
2663 2660 ENABLE_BITCODE = NO;
... ... @@ -2688,7 +2685,6 @@
2688 2685 "$(inherited)",
2689 2686 "@executable_path/Frameworks",
2690 2687 );
2691   - MARKETING_VERSION = 1.0.3;
2692 2688 ONLY_ACTIVE_ARCH = NO;
2693 2689 OTHER_CFLAGS = "'-std=gnu99'";
2694 2690 OTHER_CPLUSPLUSFLAGS = "'-std=c++11'";
... ... @@ -2865,7 +2861,6 @@
2865 2861 CLANG_ENABLE_MODULES = YES;
2866 2862 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
2867 2863 CODE_SIGN_STYLE = Manual;
2868   - CURRENT_PROJECT_VERSION = 4;
2869 2864 DEVELOPMENT_TEAM = "";
2870 2865 "DEVELOPMENT_TEAM[sdk=iphoneos*]" = T8P9KW8GWH;
2871 2866 ENABLE_BITCODE = NO;
... ... @@ -2874,7 +2869,6 @@
2874 2869 "$(inherited)",
2875 2870 "@executable_path/Frameworks",
2876 2871 );
2877   - MARKETING_VERSION = 1.0.3;
2878 2872 OTHER_CFLAGS = (
2879 2873 "-DNDEBUG",
2880 2874 "'-std=gnu99'",
... ...
ios/Runner/AppDelegate.swift
... ... @@ -13,6 +13,35 @@ import Flutter
13 13 _ = XSMessageMehtodChannel(message: controller.binaryMessenger);
14 14 _ = GameMessageChannel(message: controller.binaryMessenger);
15 15  
  16 + let registerWX = WXApi.registerApp("wx365e5a79956a450a", universalLink: "https://app-api.wowenglish.com.cn/app/");
  17 + if registerWX == true {
  18 + print("WXApi register 成功");
  19 + } else {
  20 + print("WXApi register 失败");
  21 + }
  22 +
16 23 return super.application(application, didFinishLaunchingWithOptions: launchOptions)
17 24 }
  25 +
  26 + override func application(_ application: UIApplication, handleOpen url: URL) -> Bool {
  27 + return WXApi.handleOpen(url, delegate: self);
  28 + }
  29 +
  30 + override func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
  31 + return WXApi.handleOpen(url, delegate: self);
  32 + }
  33 +
  34 + override func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([any UIUserActivityRestoring]?) -> Void) -> Bool {
  35 + return WXApi.handleOpenUniversalLink(userActivity, delegate: self);
  36 + }
  37 +}
  38 +
  39 +extension AppDelegate: WXApiDelegate {
  40 + func onReq(_ req: BaseReq) {
  41 + print("WXApiDelegate onReq");
  42 + }
  43 +
  44 + func onResp(_ resp: BaseResp) {
  45 + print("WXApiDelegate onResp ");
  46 + }
18 47 }
... ...
ios/Runner/Info.plist
... ... @@ -2,6 +2,15 @@
2 2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 3 <plist version="1.0">
4 4 <dict>
  5 + <key>LSApplicationQueriesSchemes</key>
  6 + <array>
  7 + <string>wechat</string>
  8 + <string>weixin</string>
  9 + <string>weixinULAPI</string>
  10 + <string>weixinURLParamsAPI</string>
  11 + <string>alipay</string>
  12 + <string>alipayshare</string>
  13 + </array>
5 14 <key>CADisableMinimumFrameDurationOnPhone</key>
6 15 <true/>
7 16 <key>CFBundleDevelopmentRegion</key>
... ... @@ -44,6 +53,16 @@
44 53 <string>alipayishowwoweng</string>
45 54 </array>
46 55 </dict>
  56 + <dict>
  57 + <key>CFBundleTypeRole</key>
  58 + <string>Editor</string>
  59 + <key>CFBundleURLName</key>
  60 + <string>weixin</string>
  61 + <key>CFBundleURLSchemes</key>
  62 + <array>
  63 + <string>wx365e5a79956a450a</string>
  64 + </array>
  65 + </dict>
47 66 </array>
48 67 <key>CFBundleVersion</key>
49 68 <string>5</string>
... ...
ios/Runner/Runner-Bridging-Header.h
... ... @@ -3,3 +3,5 @@
3 3 #import <SingSound/SSOralEvaluatingManager.h>
4 4  
5 5 #import "WowGameCocosManager.h"
  6 +
  7 +#import <WXApi.h>
... ...