| | |
| | | import AMapFoundationKit |
| | | |
| | | @main |
| | | class AppDelegate: UIResponder, UIApplicationDelegate { |
| | | class AppDelegate: UIResponder, UIApplicationDelegate,WXApiDelegate { |
| | | |
| | | var window: UIWindow? |
| | | var orientation:UIInterfaceOrientationMask = .portrait |
| | |
| | | return YYPaymentManager.shared.handleApplication(application, open: url, sourceApplication: sourceApplication, annotation: annotation) |
| | | } |
| | | func application(_ application: UIApplication, handleOpen url: URL) -> Bool { |
| | | if ((url.scheme?.contains("wechat")) != nil){ |
| | | return WXApi.handleOpen(url, delegate: self) |
| | | } |
| | | |
| | | return YYPaymentManager.shared.handleApplication(application, handleOpen: url) |
| | | } |
| | | // NOTE: 9.0以后使用新API接口 |
| | | func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { |
| | | if ((url.scheme?.contains("wechat")) != nil){ |
| | | return WXApi.handleOpen(url, delegate: self) |
| | | } |
| | | return YYPaymentManager.shared.handleApplication(app, open: url, options: options) |
| | | } |
| | | |
| | | func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { |
| | | return WXApi.handleOpenUniversalLink(userActivity, delegate: self) |
| | | } |
| | | } |
| | | |
| | | extension AppDelegate{ |
| | |
| | | } |
| | | } |
| | | |
| | | extension AppDelegate{ |
| | | func onReq(_ req: BaseReq) { |
| | | |
| | | } |
| | | |
| | | func onResp(_ resp: BaseResp) { |
| | | |
| | | } |
| | | } |
| | | |