mirror of
https://github.com/farcasclaudiu/flutter_plugin_appcenter.git
synced 2026-06-22 07:01:30 +03:00
21 lines
708 B
Objective-C
21 lines
708 B
Objective-C
#import "AppcenterPlugin.h"
|
|
|
|
@implementation AppcenterPlugin
|
|
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
|
|
FlutterMethodChannel* channel = [FlutterMethodChannel
|
|
methodChannelWithName:@"appcenter"
|
|
binaryMessenger:[registrar messenger]];
|
|
AppcenterPlugin* instance = [[AppcenterPlugin alloc] init];
|
|
[registrar addMethodCallDelegate:instance channel:channel];
|
|
}
|
|
|
|
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
|
|
if ([@"getPlatformVersion" isEqualToString:call.method]) {
|
|
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
|
|
} else {
|
|
result(FlutterMethodNotImplemented);
|
|
}
|
|
}
|
|
|
|
@end
|