Skip to content

Commit

Permalink
🎨 Format more
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Nov 4, 2024
1 parent eeacf73 commit 202453e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions ios/Classes/FluwxPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ @interface FluwxPlugin()<WXApiDelegate,WechatAuthAPIDelegate>

typedef void(^FluwxWXReqRunnable)(void);

@implementation FluwxPlugin {
@implementation FluwxPlugin {
FlutterMethodChannel *_channel;
WechatAuthSDK *_qrauth;
BOOL _isRunning;
Expand Down Expand Up @@ -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];
}];
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}


Expand Down Expand Up @@ -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];
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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];
Expand All @@ -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];
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 202453e

Please sign in to comment.