Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

[flutter]: revert to remote files

appflowy49cbc6c1b36c
diff --git a/app_flowy/packages/flowy_infra_ui/ios/Classes/FlowyInfraUiPlugin.h b/app_flowy/packages/flowy_infra_ui/ios/Classes/FlowyInfraUiPlugin.h
new file mode 100644
index 0000000000..9f353812ba
--- /dev/null
+++ b/app_flowy/packages/flowy_infra_ui/ios/Classes/FlowyInfraUiPlugin.h
@@ -0,0 +1,4 @@
+#import <Flutter/Flutter.h>
+
+@interface FlowyInfraUiPlugin : NSObject<FlutterPlugin>
+@end
diff --git a/app_flowy/packages/flowy_infra_ui/ios/Classes/FlowyInfraUiPlugin.m b/app_flowy/packages/flowy_infra_ui/ios/Classes/FlowyInfraUiPlugin.m
new file mode 100644
index 0000000000..6609bdcf24
--- /dev/null
+++ b/app_flowy/packages/flowy_infra_ui/ios/Classes/FlowyInfraUiPlugin.m
@@ -0,0 +1,15 @@
+#import "FlowyInfraUiPlugin.h"
+#if __has_include(<flowy_infra_ui/flowy_infra_ui-Swift.h>)
+#import <flowy_infra_ui/flowy_infra_ui-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 "flowy_infra_ui-Swift.h"
+#endif
+
+@implementation FlowyInfraUiPlugin
++ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
+ [SwiftFlowyInfraUiPlugin registerWithRegistrar:registrar];
+}
+@end
diff --git a/app_flowy/packages/flowy_infra_ui/ios/Classes/SwiftFlowyInfraUiPlugin.swift b/app_flowy/packages/flowy_infra_ui/ios/Classes/SwiftFlowyInfraUiPlugin.swift
new file mode 100644
index 0000000000..5459739470
--- /dev/null
+++ b/app_flowy/packages/flowy_infra_ui/ios/Classes/SwiftFlowyInfraUiPlugin.swift
@@ -0,0 +1,14 @@
+import Flutter
+import UIKit
+
+public class SwiftFlowyInfraUiPlugin: NSObject, FlutterPlugin {
+ public static func register(with registrar: FlutterPluginRegistrar) {
+ let channel = FlutterMethodChannel(name: "flowy_infra_ui", binaryMessenger: registrar.messenger())
+ let instance = SwiftFlowyInfraUiPlugin()
+ registrar.addMethodCallDelegate(instance, channel: channel)
+ }
+
+ public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
+ result("iOS " + UIDevice.current.systemVersion)
+ }
+}