remove Objective-C code and rename PhotoGalleryPlugin.swift
This commit is contained in:
parent
8b2269a125
commit
2887edc455
@ -1,4 +0,0 @@
|
|||||||
#import <Flutter/Flutter.h>
|
|
||||||
|
|
||||||
@interface PhotoGalleryPlugin : NSObject<FlutterPlugin>
|
|
||||||
@end
|
|
@ -1,15 +0,0 @@
|
|||||||
#import "PhotoGalleryPlugin.h"
|
|
||||||
#if __has_include(<photo_gallery/photo_gallery-Swift.h>)
|
|
||||||
#import <photo_gallery/photo_gallery-Swift.h>
|
|
||||||
#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<FlutterPluginRegistrar>*)registrar {
|
|
||||||
[SwiftPhotoGalleryPlugin registerWithRegistrar:registrar];
|
|
||||||
}
|
|
||||||
@end
|
|
@ -4,10 +4,10 @@ import Flutter
|
|||||||
import UIKit
|
import UIKit
|
||||||
import Photos
|
import Photos
|
||||||
|
|
||||||
public class SwiftPhotoGalleryPlugin: NSObject, FlutterPlugin {
|
public class PhotoGalleryPlugin: NSObject, FlutterPlugin {
|
||||||
public static func register(with registrar: FlutterPluginRegistrar) {
|
public static func register(with registrar: FlutterPluginRegistrar) {
|
||||||
let channel = FlutterMethodChannel(name: "photo_gallery", binaryMessenger: registrar.messenger())
|
let channel = FlutterMethodChannel(name: "photo_gallery", binaryMessenger: registrar.messenger())
|
||||||
let instance = SwiftPhotoGalleryPlugin()
|
let instance = PhotoGalleryPlugin()
|
||||||
registrar.addMethodCallDelegate(instance, channel: channel)
|
registrar.addMethodCallDelegate(instance, channel: channel)
|
||||||
}
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user