diff --git a/example/.gitignore b/example/.gitignore
index a956bd6..ee817a4 100644
--- a/example/.gitignore
+++ b/example/.gitignore
@@ -5,9 +5,11 @@
*.swp
.DS_Store
.atom/
+.build/
.buildlog/
.history
.svn/
+.swiftpm/
migrate_working_dir/
# IntelliJ related
diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist
index 9625e10..7c56964 100644
--- a/example/ios/Flutter/AppFrameworkInfo.plist
+++ b/example/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 11.0
+ 12.0
diff --git a/example/ios/Podfile b/example/ios/Podfile
index 5380288..88d8a5d 100644
--- a/example/ios/Podfile
+++ b/example/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-# platform :ios, '11.0'
+# platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index 196468f..0924f3b 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -15,6 +15,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -56,6 +57,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
4531921BCA703AFAC8D9F47C /* libPods-Runner.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -140,6 +142,9 @@
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
+ packageProductDependencies = (
+ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
+ );
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
@@ -164,9 +169,12 @@
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
+ packageReferences = (
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
+ );
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1300;
+ LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -336,7 +344,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -411,7 +419,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -460,7 +468,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -531,6 +539,18 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
+/* Begin XCLocalSwiftPackageReference section */
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
+ isa = XCLocalSwiftPackageReference;
+ relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
+ };
+/* End XCLocalSwiftPackageReference section */
+/* Begin XCSwiftPackageProductDependency section */
+ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
+ isa = XCSwiftPackageProductDependency;
+ productName = FlutterGeneratedPluginSwiftPackage;
+ };
+/* End XCSwiftPackageProductDependency section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index c87d15a..5db441f 100644
--- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,10 +1,28 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/example/macos/Podfile b/example/macos/Podfile
index dade8df..049abe2 100644
--- a/example/macos/Podfile
+++ b/example/macos/Podfile
@@ -1,4 +1,4 @@
-platform :osx, '10.11'
+platform :osx, '10.14'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj
index 750ce94..577960d 100644
--- a/example/macos/Runner.xcodeproj/project.pbxproj
+++ b/example/macos/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 51;
+ objectVersion = 54;
objects = {
/* Begin PBXAggregateTarget section */
@@ -26,6 +26,8 @@
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
+ 6F9914626403FB9251DB0E28 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC3608428011057228898BD3 /* Pods_Runner.framework */; };
+ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -54,7 +56,7 @@
/* Begin PBXFileReference section */
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; };
- 33CC10ED2044A3C60003C045 /* iris_method_channel_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iris_method_channel_example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 33CC10ED2044A3C60003C045 /* iris_method_channel_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iris_method_channel_example.app; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
@@ -66,8 +68,12 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; };
+ 534000EA186ABD451EDC5E57 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
+ 7FDC2A285E89329721841F29 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
+ DC3608428011057228898BD3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ DFBC3F032EC7F709C647B301 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -75,6 +81,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
+ 6F9914626403FB9251DB0E28 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -99,6 +107,7 @@
33CEB47122A05771004F2AC0 /* Flutter */,
33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */,
+ E079A1ABB7AF8108A08BCDEC /* Pods */,
);
sourceTree = "";
};
@@ -148,10 +157,22 @@
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ DC3608428011057228898BD3 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "";
};
+ E079A1ABB7AF8108A08BCDEC /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 534000EA186ABD451EDC5E57 /* Pods-Runner.debug.xcconfig */,
+ 7FDC2A285E89329721841F29 /* Pods-Runner.release.xcconfig */,
+ DFBC3F032EC7F709C647B301 /* Pods-Runner.profile.xcconfig */,
+ );
+ name = Pods;
+ path = Pods;
+ sourceTree = "";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -159,6 +180,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
+ 7040CBFB4923215848D09DEE /* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
@@ -171,6 +193,9 @@
33CC11202044C79F0003C045 /* PBXTargetDependency */,
);
name = Runner;
+ packageProductDependencies = (
+ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
+ );
productName = Runner;
productReference = 33CC10ED2044A3C60003C045 /* iris_method_channel_example.app */;
productType = "com.apple.product-type.application";
@@ -182,7 +207,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
- LastUpgradeCheck = 1300;
+ LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
@@ -210,6 +235,9 @@
Base,
);
mainGroup = 33CC10E42044A3C60003C045;
+ packageReferences = (
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
+ );
productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
projectDirPath = "";
projectRoot = "";
@@ -235,6 +263,7 @@
/* Begin PBXShellScriptBuildPhase section */
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -270,6 +299,28 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
+ 7040CBFB4923215848D09DEE /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -344,7 +395,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
@@ -423,7 +474,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
@@ -470,7 +521,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
@@ -567,6 +618,20 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
+
+/* Begin XCLocalSwiftPackageReference section */
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
+ isa = XCLocalSwiftPackageReference;
+ relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
+ };
+/* End XCLocalSwiftPackageReference section */
+
+/* Begin XCSwiftPackageProductDependency section */
+ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
+ isa = XCSwiftPackageProductDependency;
+ productName = FlutterGeneratedPluginSwiftPackage;
+ };
+/* End XCSwiftPackageProductDependency section */
};
rootObject = 33CC10E52044A3C60003C045 /* Project object */;
}
diff --git a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 88ac0ac..7eafd34 100644
--- a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,10 +1,28 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/example/macos/Runner.xcworkspace/contents.xcworkspacedata
index 1d526a1..21a3cc1 100644
--- a/example/macos/Runner.xcworkspace/contents.xcworkspacedata
+++ b/example/macos/Runner.xcworkspace/contents.xcworkspacedata
@@ -4,4 +4,7 @@
+
+
diff --git a/example/macos/Runner/AppDelegate.swift b/example/macos/Runner/AppDelegate.swift
index d53ef64..b3c1761 100644
--- a/example/macos/Runner/AppDelegate.swift
+++ b/example/macos/Runner/AppDelegate.swift
@@ -1,9 +1,13 @@
import Cocoa
import FlutterMacOS
-@NSApplicationMain
+@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}
+
+ override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
+ return true
+ }
}
diff --git a/ios/.gitignore b/ios/.gitignore
index 0c88507..538c33b 100644
--- a/ios/.gitignore
+++ b/ios/.gitignore
@@ -35,4 +35,6 @@ Icon?
/Flutter/Generated.xcconfig
/Flutter/ephemeral/
-/Flutter/flutter_export_environment.sh
\ No newline at end of file
+/Flutter/flutter_export_environment.sh
+
+.swiftpm
diff --git a/ios/iris_method_channel.podspec b/ios/iris_method_channel.podspec
index 3a2c430..72dd607 100644
--- a/ios/iris_method_channel.podspec
+++ b/ios/iris_method_channel.podspec
@@ -13,8 +13,8 @@ A new Flutter plugin project.
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
- s.source_files = 'Classes/**/*'
- s.public_header_files = 'Classes/**/*.h'
+ s.source_files = 'iris_method_channel/Sources/**/*'
+ s.public_header_files = 'iris_method_channel/Sources/iris_method_channel/include/**/*.h'
s.dependency 'Flutter'
s.platform = :ios, '9.0'
s.libraries = 'stdc++'
diff --git a/ios/iris_method_channel/Package.swift b/ios/iris_method_channel/Package.swift
new file mode 100644
index 0000000..59fb85b
--- /dev/null
+++ b/ios/iris_method_channel/Package.swift
@@ -0,0 +1,28 @@
+// swift-tools-version: 5.9
+// The swift-tools-version declares the minimum version of Swift required to build this package.
+
+import PackageDescription
+
+let package = Package(
+ name: "iris_method_channel",
+ platforms: [
+ .iOS("12.0"),
+ ],
+ products: [
+ .library(name: "iris-method-channel", targets: ["iris_method_channel"])
+ ],
+ dependencies: [],
+ targets: [
+ .target(
+ name: "iris_method_channel",
+ dependencies: [],
+ publicHeadersPath: "include/iris_method_channel",
+ cSettings: [
+ .headerSearchPath("include/iris_method_channel")
+ ],
+ cxxSettings: [
+ .unsafeFlags(["-std=c++14"])
+ ]
+ )
+ ]
+)
diff --git a/ios/Classes/IrisMethodChannelForward.mm b/ios/iris_method_channel/Sources/iris_method_channel/IrisMethodChannelForward.mm
similarity index 75%
rename from ios/Classes/IrisMethodChannelForward.mm
rename to ios/iris_method_channel/Sources/iris_method_channel/IrisMethodChannelForward.mm
index 8e6baee..c104018 100644
--- a/ios/Classes/IrisMethodChannelForward.mm
+++ b/ios/iris_method_channel/Sources/iris_method_channel/IrisMethodChannelForward.mm
@@ -4,7 +4,7 @@
// Ignore warning of [-Wdocumentation] of dart_api_dl.h
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"
-#include "../../src/iris_event.cc"
+#include "../../../../src/iris_event.cc"
#pragma clang diagnostic pop
-#include "../../src/iris_life_cycle_observer.mm"
+#include "../../../../src/iris_life_cycle_observer.mm"
diff --git a/ios/Classes/IrisMethodChannelPlugin.m b/ios/iris_method_channel/Sources/iris_method_channel/IrisMethodChannelPlugin.m
similarity index 89%
rename from ios/Classes/IrisMethodChannelPlugin.m
rename to ios/iris_method_channel/Sources/iris_method_channel/IrisMethodChannelPlugin.m
index 7df1bf5..53b113d 100644
--- a/ios/Classes/IrisMethodChannelPlugin.m
+++ b/ios/iris_method_channel/Sources/iris_method_channel/IrisMethodChannelPlugin.m
@@ -1,5 +1,5 @@
-#import "IrisMethodChannelPlugin.h"
-#include "../../src/iris_event.h"
+#import "./include/iris_method_channel/IrisMethodChannelPlugin.h"
+#include "../../../../src/iris_event.h"
@implementation IrisMethodChannelPlugin
+ (void)registerWithRegistrar:(NSObject*)registrar {
diff --git a/ios/Classes/dart_api_dl.c b/ios/iris_method_channel/Sources/iris_method_channel/dart_api_dl.c
similarity index 70%
rename from ios/Classes/dart_api_dl.c
rename to ios/iris_method_channel/Sources/iris_method_channel/dart_api_dl.c
index 071e533..b4fda6d 100644
--- a/ios/Classes/dart_api_dl.c
+++ b/ios/iris_method_channel/Sources/iris_method_channel/dart_api_dl.c
@@ -2,5 +2,5 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"
#pragma clang diagnostic ignored "-Wstrict-prototypes"
-#include "../../src/dart-sdk/include/dart_api_dl.c"
-#pragma clang diagnostic pop
\ No newline at end of file
+#include "../../../../src/dart-sdk/include/dart_api_dl.c"
+#pragma clang diagnostic pop
diff --git a/ios/Classes/IrisMethodChannelPlugin.h b/ios/iris_method_channel/Sources/iris_method_channel/include/iris_method_channel/IrisMethodChannelPlugin.h
similarity index 100%
rename from ios/Classes/IrisMethodChannelPlugin.h
rename to ios/iris_method_channel/Sources/iris_method_channel/include/iris_method_channel/IrisMethodChannelPlugin.h
diff --git a/macos/.gitignore b/macos/.gitignore
new file mode 100644
index 0000000..3552f2b
--- /dev/null
+++ b/macos/.gitignore
@@ -0,0 +1 @@
+.swiftpm
diff --git a/macos/iris_method_channel.podspec b/macos/iris_method_channel.podspec
index 42df4e3..d47f0f9 100644
--- a/macos/iris_method_channel.podspec
+++ b/macos/iris_method_channel.podspec
@@ -14,7 +14,7 @@ A new Flutter plugin project.
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
- s.source_files = 'Classes/**/*'
+ s.source_files = 'iris_method_channel/Sources/**/*'
s.dependency 'FlutterMacOS'
s.requires_arc = []
s.libraries = 'stdc++'
diff --git a/macos/iris_method_channel/Package.swift b/macos/iris_method_channel/Package.swift
new file mode 100644
index 0000000..6c28216
--- /dev/null
+++ b/macos/iris_method_channel/Package.swift
@@ -0,0 +1,33 @@
+// swift-tools-version: 5.9
+// The swift-tools-version declares the minimum version of Swift required to build this package.
+
+import PackageDescription
+
+let package = Package(
+ name: "iris_method_channel",
+ platforms: [
+ .macOS("10.14")
+ ],
+ products: [
+ .library(name: "iris-method-channel", targets: ["iris_method_channel"])
+ ],
+ dependencies: [],
+ targets: [
+ .target(
+ name: "iris_method_channel",
+ dependencies: [
+ "iris_method_channel_objc"
+ ]
+ ),
+ .target(
+ name: "iris_method_channel_objc",
+ dependencies: [],
+ cSettings: [
+ .headerSearchPath("include/iris_method_channel")
+ ],
+ cxxSettings: [
+ .unsafeFlags(["-std=c++14"])
+ ]
+ )
+ ]
+)
diff --git a/macos/Classes/IrisMethodChannelPlugin.swift b/macos/iris_method_channel/Sources/iris_method_channel/IrisMethodChannelPlugin.swift
similarity index 89%
rename from macos/Classes/IrisMethodChannelPlugin.swift
rename to macos/iris_method_channel/Sources/iris_method_channel/IrisMethodChannelPlugin.swift
index 7926967..e9d7e93 100644
--- a/macos/Classes/IrisMethodChannelPlugin.swift
+++ b/macos/iris_method_channel/Sources/iris_method_channel/IrisMethodChannelPlugin.swift
@@ -1,6 +1,10 @@
import Cocoa
import FlutterMacOS
+#if canImport(iris_method_channel_objc)
+ import iris_method_channel_objc
+#endif
+
public class IrisMethodChannelPlugin: NSObject, FlutterPlugin {
public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "iris_method_channel", binaryMessenger: registrar.messenger)
diff --git a/macos/Classes/IrisMethodChannelForward.mm b/macos/iris_method_channel/Sources/iris_method_channel_objc/IrisMethodChannelForward.mm
similarity index 75%
rename from macos/Classes/IrisMethodChannelForward.mm
rename to macos/iris_method_channel/Sources/iris_method_channel_objc/IrisMethodChannelForward.mm
index 8e6baee..c104018 100644
--- a/macos/Classes/IrisMethodChannelForward.mm
+++ b/macos/iris_method_channel/Sources/iris_method_channel_objc/IrisMethodChannelForward.mm
@@ -4,7 +4,7 @@
// Ignore warning of [-Wdocumentation] of dart_api_dl.h
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"
-#include "../../src/iris_event.cc"
+#include "../../../../src/iris_event.cc"
#pragma clang diagnostic pop
-#include "../../src/iris_life_cycle_observer.mm"
+#include "../../../../src/iris_life_cycle_observer.mm"
diff --git a/macos/Classes/dart_api_dl.c b/macos/iris_method_channel/Sources/iris_method_channel_objc/dart_api_dl.c
similarity index 70%
rename from macos/Classes/dart_api_dl.c
rename to macos/iris_method_channel/Sources/iris_method_channel_objc/dart_api_dl.c
index 071e533..b4fda6d 100644
--- a/macos/Classes/dart_api_dl.c
+++ b/macos/iris_method_channel/Sources/iris_method_channel_objc/dart_api_dl.c
@@ -2,5 +2,5 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"
#pragma clang diagnostic ignored "-Wstrict-prototypes"
-#include "../../src/dart-sdk/include/dart_api_dl.c"
-#pragma clang diagnostic pop
\ No newline at end of file
+#include "../../../../src/dart-sdk/include/dart_api_dl.c"
+#pragma clang diagnostic pop
diff --git a/ios/Assets/.gitkeep b/macos/iris_method_channel/Sources/iris_method_channel_objc/include/iris_method_channel/.gitkeep
similarity index 100%
rename from ios/Assets/.gitkeep
rename to macos/iris_method_channel/Sources/iris_method_channel_objc/include/iris_method_channel/.gitkeep