log
parent
282b248e03
commit
0f74e0f6fc
|
@ -17,6 +17,8 @@
|
||||||
NSLog(@"MOP_registerSyncExtensionApi,name=%@",self.name);
|
NSLog(@"MOP_registerSyncExtensionApi,name=%@",self.name);
|
||||||
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
|
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
|
||||||
[[FATClient sharedClient] registerSyncExtensionApi:self.name handler:^NSDictionary *(FATAppletInfo *appletInfo, id param) {
|
[[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"]){
|
if([self.name isEqualToString:@"getLanguageCodeSync"]){
|
||||||
NSDictionary *resultDict = [NSDictionary dictionary];
|
NSDictionary *resultDict = [NSDictionary dictionary];
|
||||||
NSString* shortCode = [PhizLanguageData sharedInstance].languageCode;
|
NSString* shortCode = [PhizLanguageData sharedInstance].languageCode;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
static PhizLanguageData *sharedInstance = nil;
|
static PhizLanguageData *sharedInstance = nil;
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
sharedInstance = [[self alloc] init];
|
sharedInstance = [[PhizLanguageData alloc] init];
|
||||||
sharedInstance.languageCode = @"en"; // Set default language code
|
sharedInstance.languageCode = @"en"; // Set default language code
|
||||||
sharedInstance.countryCode = @"US";
|
sharedInstance.countryCode = @"US";
|
||||||
});
|
});
|
||||||
|
|
|
@ -79,6 +79,8 @@ static MopPlugin *_instance;
|
||||||
|
|
||||||
|
|
||||||
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
|
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
|
||||||
|
NSLog(@"handleMethodCall, %@ %@",call.method,call.arguments);
|
||||||
|
|
||||||
if ([@"getPlatformVersion" isEqualToString:call.method]) {
|
if ([@"getPlatformVersion" isEqualToString:call.method]) {
|
||||||
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
|
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue