Initialisation from plugin template.

This commit is contained in:
Aloïs Deniel
2018-01-04 06:46:03 +01:00
parent 388d89cace
commit e6c43ec60b
84 changed files with 2102 additions and 31 deletions
+20
View File
@@ -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