mirror of
https://github.com/farcasclaudiu/flutter_plugin_appcenter.git
synced 2026-06-28 13:01:24 +03:00
Initialisation from plugin template.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user