diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..aa479fd --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,37 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/ios/Assets/.gitkeep b/ios/Assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ios/Classes/FlutterWindowmanagerPlugin.h b/ios/Classes/FlutterWindowmanagerPlugin.h new file mode 100644 index 0000000..bd0a634 --- /dev/null +++ b/ios/Classes/FlutterWindowmanagerPlugin.h @@ -0,0 +1,4 @@ +#import + +@interface FlutterWindowmanagerPlugin : NSObject +@end diff --git a/ios/Classes/FlutterWindowmanagerPlugin.m b/ios/Classes/FlutterWindowmanagerPlugin.m new file mode 100644 index 0000000..fd2d7f2 --- /dev/null +++ b/ios/Classes/FlutterWindowmanagerPlugin.m @@ -0,0 +1,15 @@ +#import "FlutterWindowmanagerPlugin.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 "flutter_windowmanager-Swift.h" +#endif + +@implementation FlutterWindowmanagerPlugin ++ (void)registerWithRegistrar:(NSObject*)registrar { + [SwiftFlutterWindowmanagerPlugin registerWithRegistrar:registrar]; +} +@end diff --git a/ios/Classes/SwiftFlutterWindowmanagerPlugin.swift b/ios/Classes/SwiftFlutterWindowmanagerPlugin.swift new file mode 100644 index 0000000..49be7e0 --- /dev/null +++ b/ios/Classes/SwiftFlutterWindowmanagerPlugin.swift @@ -0,0 +1,14 @@ +import Flutter +import UIKit + +public class SwiftFlutterWindowmanagerPlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) { + let channel = FlutterMethodChannel(name: "flutter_windowmanager", binaryMessenger: registrar.messenger()) + let instance = SwiftFlutterWindowmanagerPlugin() + registrar.addMethodCallDelegate(instance, channel: channel) + } + + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { + result("iOS " + UIDevice.current.systemVersion) + } +} diff --git a/ios/flutter_windowmanager.podspec b/ios/flutter_windowmanager.podspec new file mode 100644 index 0000000..f1c1788 --- /dev/null +++ b/ios/flutter_windowmanager.podspec @@ -0,0 +1,23 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint flutter_windowmanager.podspec' to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'flutter_windowmanager' + s.version = '0.0.1' + s.summary = 'A new flutter plugin project.' + s.description = <<-DESC +A new flutter plugin project. + DESC + s.homepage = 'http://example.com' + s.license = { :file => '../LICENSE' } + s.author = { 'Your Company' => 'email@example.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.platform = :ios, '8.0' + + # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } + s.swift_version = '5.0' +end