From 2887edc455ba4b6617958b2960e04d6b1347eccb Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Mon, 14 Aug 2023 01:06:39 +0800 Subject: [PATCH] remove Objective-C code and rename PhotoGalleryPlugin.swift --- ios/Classes/PhotoGalleryPlugin.h | 4 ---- ios/Classes/PhotoGalleryPlugin.m | 15 --------------- ...lleryPlugin.swift => PhotoGalleryPlugin.swift} | 4 ++-- 3 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 ios/Classes/PhotoGalleryPlugin.h delete mode 100644 ios/Classes/PhotoGalleryPlugin.m rename ios/Classes/{SwiftPhotoGalleryPlugin.swift => PhotoGalleryPlugin.swift} (99%) diff --git a/ios/Classes/PhotoGalleryPlugin.h b/ios/Classes/PhotoGalleryPlugin.h deleted file mode 100644 index 6878782..0000000 --- a/ios/Classes/PhotoGalleryPlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface PhotoGalleryPlugin : NSObject -@end diff --git a/ios/Classes/PhotoGalleryPlugin.m b/ios/Classes/PhotoGalleryPlugin.m deleted file mode 100644 index 0aeabdc..0000000 --- a/ios/Classes/PhotoGalleryPlugin.m +++ /dev/null @@ -1,15 +0,0 @@ -#import "PhotoGalleryPlugin.h" -#if __has_include() -#import -#else -// Support project import fallback if the generated compatibility header -// is not copied when this plugin is created as a library. -// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 -#import "photo_gallery-Swift.h" -#endif - -@implementation PhotoGalleryPlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - [SwiftPhotoGalleryPlugin registerWithRegistrar:registrar]; -} -@end diff --git a/ios/Classes/SwiftPhotoGalleryPlugin.swift b/ios/Classes/PhotoGalleryPlugin.swift similarity index 99% rename from ios/Classes/SwiftPhotoGalleryPlugin.swift rename to ios/Classes/PhotoGalleryPlugin.swift index d8d30e0..e5cf319 100644 --- a/ios/Classes/SwiftPhotoGalleryPlugin.swift +++ b/ios/Classes/PhotoGalleryPlugin.swift @@ -4,10 +4,10 @@ import Flutter import UIKit import Photos -public class SwiftPhotoGalleryPlugin: NSObject, FlutterPlugin { +public class PhotoGalleryPlugin: NSObject, FlutterPlugin { public static func register(with registrar: FlutterPluginRegistrar) { let channel = FlutterMethodChannel(name: "photo_gallery", binaryMessenger: registrar.messenger()) - let instance = SwiftPhotoGalleryPlugin() + let instance = PhotoGalleryPlugin() registrar.addMethodCallDelegate(instance, channel: channel) }