From 6e46c64c92827cef7dedfe5674e9370b0a4bd572 Mon Sep 17 00:00:00 2001 From: wgh19 Date: Tue, 23 Apr 2024 12:10:43 +0800 Subject: [PATCH] update ios and macos --- macos/Classes/FlutterQjsPlugin.swift | 19 ------------------- macos/flutter_qjs.podspec | 2 +- pubspec.yaml | 4 ++-- 3 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 macos/Classes/FlutterQjsPlugin.swift diff --git a/macos/Classes/FlutterQjsPlugin.swift b/macos/Classes/FlutterQjsPlugin.swift deleted file mode 100644 index db1b450..0000000 --- a/macos/Classes/FlutterQjsPlugin.swift +++ /dev/null @@ -1,19 +0,0 @@ -import Cocoa -import FlutterMacOS - -public class FlutterQjsPlugin: NSObject, FlutterPlugin { - public static func register(with registrar: FlutterPluginRegistrar) { - let channel = FlutterMethodChannel(name: "flutter_qjs", binaryMessenger: registrar.messenger) - let instance = FlutterQjsPlugin() - registrar.addMethodCallDelegate(instance, channel: channel) - } - - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { - switch call.method { - case "getPlatformVersion": - result("macOS " + ProcessInfo.processInfo.operatingSystemVersionString) - default: - result(FlutterMethodNotImplemented) - } - } -} diff --git a/macos/flutter_qjs.podspec b/macos/flutter_qjs.podspec index bf43bcf..48d5097 100644 --- a/macos/flutter_qjs.podspec +++ b/macos/flutter_qjs.podspec @@ -14,7 +14,7 @@ This plugin is a simple js engine for flutter using the `quickjs` project. Plugi s.author = { 'ekibun' => 'soekibun@gmail.com' } s.source = { :path => '.' } s.compiler_flags = '-DDUMP_LEAKS' - s.source_files = ['Classes/**/*', 'cxx/*.{c,cpp}'] + s.source_files = ['cxx/*.{c,cpp}'] s.dependency 'FlutterMacOS' s.platform = :osx, '10.11' diff --git a/pubspec.yaml b/pubspec.yaml index 6bbd3c3..0752072 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -43,9 +43,9 @@ flutter: pluginClass: FlutterQjsPlugin package: soko.ekibun.flutter_qjs macos: - pluginClass: FlutterQjsPlugin + ffiPlugin: true ios: - pluginClass: FlutterQjsPlugin + ffiPlugin: true # ------------------- # To add assets to your plugin package, add an assets section, like this: