From 202453e7363a3f5dba485f6ed49001c48e92a40c Mon Sep 17 00:00:00 2001 From: Alex Li Date: Mon, 4 Nov 2024 17:41:36 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Format=20more?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/FluwxPlugin.m | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ios/Classes/FluwxPlugin.m b/ios/Classes/FluwxPlugin.m index c0369973..ed0d9df8 100644 --- a/ios/Classes/FluwxPlugin.m +++ b/ios/Classes/FluwxPlugin.m @@ -43,7 +43,7 @@ @interface FluwxPlugin() typedef void(^FluwxWXReqRunnable)(void); -@implementation FluwxPlugin { +@implementation FluwxPlugin { FlutterMethodChannel *_channel; WechatAuthSDK *_qrauth; BOOL _isRunning; @@ -134,7 +134,7 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result [self openWeChatInvoice:call result:result]; } else if ([@"selfCheck" isEqualToString:call.method]) { #ifndef __OPTIMIZE__ - [WXApi checkUniversalLinkReady:^(WXULCheckStep step, WXCheckULStepResult* result) { + [WXApi checkUniversalLinkReady:^(WXULCheckStep step, WXCheckULStepResult *result) { NSString *log = [NSString stringWithFormat:@"%@, %u, %@, %@", @(step), result.success, result.errorInfo, result.suggestion]; [self logToFlutterWithDetail:log]; }]; @@ -187,7 +187,7 @@ - (void)openWeChatInvoice:(FlutterMethodCall *)call result:(FlutterResult)result } - (void)registerApp:(FlutterMethodCall *)call result:(FlutterResult)result { - NSNumber* doOnIOS =call.arguments[@"iOS"]; + NSNumber *doOnIOS = call.arguments[@"iOS"]; if (![doOnIOS boolValue]) { result(@NO); @@ -277,7 +277,7 @@ - (void)handlePayment:(FlutterMethodCall *)call result:(FlutterResult)result { NSString *sign = call.arguments[@"sign"]; [FluwxDelegate defaultManager].extData = call.arguments[@"extData"]; - NSString * appId = call.arguments[@"appId"]; + NSString *appId = call.arguments[@"appId"]; PayReq *req = [[PayReq alloc] init]; req.openID = (appId == (id) [NSNull null]) ? nil : appId; req.partnerId = partnerId; @@ -393,7 +393,7 @@ - (void)handleOpenBusinessView:(FlutterMethodCall *)call result:(FlutterResult)r - (void)handelGetExtMsgWithCall:(FlutterMethodCall *)call result:(FlutterResult)result { result([FluwxDelegate defaultManager].extMsg); - [FluwxDelegate defaultManager].extMsg=nil; + [FluwxDelegate defaultManager].extMsg = nil; } @@ -443,14 +443,14 @@ - (BOOL)application:(UIApplication *)app } #ifndef SCENE_DELEGATE -- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nonnull))restorationHandler{ +- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *_Nonnull))restorationHandler{ // TODO: (if need) cache userActivity and handle it once WXApi is registered return [WXApi handleOpenUniversalLink:userActivity delegate:self]; } #endif #ifdef SCENE_DELEGATE -- (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity API_AVAILABLE(ios(13.0)) { +- (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity API_AVAILABLE(ios(13.0)) { // TODO: (if need) cache userActivity and handle it once WXApi is registered [WXApi handleOpenUniversalLink:userActivity delegate:self]; } @@ -532,7 +532,7 @@ - (void)shareImage:(FlutterMethodCall *)call result:(FlutterResult)result { imageData = flutterImageData.data; } - NSString * imageDataHash = sourceImage[@"imgDataHash"]; + NSString *imageDataHash = sourceImage[@"imgDataHash"]; FlutterStandardTypedData *flutterThumbData = call.arguments[fluwxKeyThumbData]; NSData *thumbData = nil; @@ -1030,7 +1030,7 @@ - (void)onReq:(BaseReq *)req { [result setValue:showMessageFromWXReq.country forKey:@"country"]; // Cache extMsg for later use (by calling 'getExtMsg') - [FluwxDelegate defaultManager].extMsg= wmm.messageExt; + [FluwxDelegate defaultManager].extMsg = wmm.messageExt; if (_isRunning) { [_channel invokeMethod:@"onWXShowMessageFromWX" arguments:result]; @@ -1053,7 +1053,7 @@ - (void)onReq:(BaseReq *)req { [result setValue:launchFromWXReq.country forKey:@"country"]; // Cache extMsg for later use (by calling 'getExtMsg') - [FluwxDelegate defaultManager].extMsg= wmm.messageExt; + [FluwxDelegate defaultManager].extMsg = wmm.messageExt; if (_isRunning) { [_channel invokeMethod:@"onWXLaunchFromWX" arguments:result]; @@ -1553,11 +1553,11 @@ - (SendMessageToWXReq *)requestWithText:(NSString *)text } - (NSString*)fetchWeChatAppId { - NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary]; - NSArray* types = infoDic[@"CFBundleURLTypes"]; - for (NSDictionary* dic in types) { - if ([@"weixin" isEqualToString:dic[@"CFBundleURLName"]]) { - return dic[@"CFBundleURLSchemes"][0]; + NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary]; + NSArray *types = infoDict[@"CFBundleURLTypes"]; + for (NSDictionary *dict in types) { + if ([@"weixin" isEqualToString:dict[@"CFBundleURLName"]]) { + return dict[@"CFBundleURLSchemes"][0]; } } return nil;