From 545788e9947664f3cad7c319e3376ceb81433214 Mon Sep 17 00:00:00 2001 From: wanghualei Date: Fri, 8 Jan 2021 15:03:14 +0800 Subject: [PATCH] =?UTF-8?q?add=20handle=20openURL=E7=9A=84=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/MopPlugin.m | 5 +++++ ios/Classes/Utils/MOPBaseApi.h | 1 + 2 files changed, 6 insertions(+) diff --git a/ios/Classes/MopPlugin.m b/ios/Classes/MopPlugin.m index d927950..b7cbafc 100644 --- a/ios/Classes/MopPlugin.m +++ b/ios/Classes/MopPlugin.m @@ -35,6 +35,7 @@ static MopPlugin *_instance; methodChannelWithName:@"mop" binaryMessenger:[registrar messenger]]; _instance = [[MopPlugin alloc] init]; + [registrar addApplicationDelegate:_instance]; [registrar addMethodCallDelegate:_instance channel:channel]; _instance.methodChannel = channel; @@ -85,4 +86,8 @@ static MopPlugin *_instance; } } +- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { + return [[FATClient sharedClient] handleOpenURL:url]; +} + @end diff --git a/ios/Classes/Utils/MOPBaseApi.h b/ios/Classes/Utils/MOPBaseApi.h index 0c6ff49..7972ddd 100644 --- a/ios/Classes/Utils/MOPBaseApi.h +++ b/ios/Classes/Utils/MOPBaseApi.h @@ -6,6 +6,7 @@ // #import +#import NS_ASSUME_NONNULL_BEGIN