FlutterAliyunPushPlugin.m 750 B

1234567891011121314151617181920
  1. #import "FlutterAliyunPushPlugin.h"
  2. @implementation FlutterAliyunPushPlugin
  3. + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
  4. FlutterMethodChannel* channel = [FlutterMethodChannel
  5. methodChannelWithName:@"flutter_aliyun_push"
  6. binaryMessenger:[registrar messenger]];
  7. FlutterAliyunPushPlugin* instance = [[FlutterAliyunPushPlugin 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