phiz_2.43.5.1
Sean 2024-03-14 15:01:29 +08:00
parent 282b248e03
commit 0f74e0f6fc
3 changed files with 7 additions and 3 deletions

View File

@ -17,6 +17,8 @@
NSLog(@"MOP_registerSyncExtensionApi,name=%@",self.name);
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
[[FATClient sharedClient] registerSyncExtensionApi:self.name handler:^NSDictionary *(FATAppletInfo *appletInfo, id param) {
NSLog(@"MOP_registerSyncExtensionApi handler,name=%@ %@",self.name,[PhizLanguageData sharedInstance].languageCode);
if([self.name isEqualToString:@"getLanguageCodeSync"]){
NSDictionary *resultDict = [NSDictionary dictionary];
NSString* shortCode = [PhizLanguageData sharedInstance].languageCode;

View File

@ -13,7 +13,7 @@
static PhizLanguageData *sharedInstance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = [[self alloc] init];
sharedInstance = [[PhizLanguageData alloc] init];
sharedInstance.languageCode = @"en"; // Set default language code
sharedInstance.countryCode = @"US";
});

View File

@ -79,6 +79,8 @@ static MopPlugin *_instance;
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
NSLog(@"handleMethodCall, %@ %@",call.method,call.arguments);
if ([@"getPlatformVersion" isEqualToString:call.method]) {
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
}