基础库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 4 години
1234567891011121314151617181920
  1. #import "ZhiyingCommPlugin.h"
  2. @implementation ZhiyingCommPlugin
  3. + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
  4. FlutterMethodChannel* channel = [FlutterMethodChannel
  5. methodChannelWithName:@"zhiying_comm"
  6. binaryMessenger:[registrar messenger]];
  7. ZhiyingCommPlugin* instance = [[ZhiyingCommPlugin alloc] init];
  8. [registrar addMethodCallDelegate:instance channel:channel];
  9. }
  10. - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
  11. if ([@"getPlatformVersion" isEqualToString:call.method]) {
  12. result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
  13. } else {
  14. result(FlutterMethodNotImplemented);
  15. }
  16. }
  17. @end