From c3d36286812cd495bb45f06026c234c6bc547511 Mon Sep 17 00:00:00 2001 From: Madiyar Aitbayev Date: Thu, 28 Apr 2022 02:04:15 +0100 Subject: [PATCH 1/9] Expose textColor and caretColor APIs --- mathEditor/editor/MTEditableMathLabel.h | 2 ++ mathEditor/editor/MTEditableMathLabel.m | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/mathEditor/editor/MTEditableMathLabel.h b/mathEditor/editor/MTEditableMathLabel.h index 318a7fb..209614d 100644 --- a/mathEditor/editor/MTEditableMathLabel.h +++ b/mathEditor/editor/MTEditableMathLabel.h @@ -66,6 +66,8 @@ @property (nonatomic) MTMathList* mathList; @property (nonatomic) UIColor* highlightColor; +@property (nonatomic) UIColor* textColor; +@property (nonatomic) UIColor* caretColor; @property (nonatomic) UIImageView* cancelImage; @property (nonatomic, weak) id delegate; diff --git a/mathEditor/editor/MTEditableMathLabel.m b/mathEditor/editor/MTEditableMathLabel.m index 05f528f..0d732f2 100644 --- a/mathEditor/editor/MTEditableMathLabel.m +++ b/mathEditor/editor/MTEditableMathLabel.m @@ -117,6 +117,26 @@ -(void)layoutSubviews [self insertionPointChanged]; } +- (void)setTextColor:(UIColor *)textColor +{ + self.label.textColor = textColor; +} + +- (UIColor*)textColor +{ + return self.label.textColor; +} + +- (void)setCaretColor:(UIColor *)caretColor +{ + _caretView.caretColor = caretColor; +} + +- (UIColor *)caretColor +{ + return _caretView.caretColor; +} + - (void)setBackgroundColor:(UIColor *)backgroundColor { [super setBackgroundColor:backgroundColor]; From 83148f2ce8fca8ab6878274490ab5711a03da179 Mon Sep 17 00:00:00 2001 From: Madiyar Aitbayev Date: Mon, 11 Jul 2022 01:28:37 +0100 Subject: [PATCH 2/9] Swift package manager --- .gitignore | 4 +++ Package.resolved | 14 +++++++++ Package.swift | 40 +++++++++++++++++++++++++ Tests/MTDisplayEditingTest.m | 1 - mathEditor/MathKeyboardResources | 1 + mathEditor/editor/MTEditableMathLabel.h | 2 +- 6 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 Package.resolved create mode 100644 Package.swift create mode 120000 mathEditor/MathKeyboardResources diff --git a/.gitignore b/.gitignore index a74cfed..96c6c72 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,7 @@ Carthage/Build fastlane/report.xml fastlane/screenshots + +# Swift Package Manager +.swiftpm/ +.build/ diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..3ea8321 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "iosmath", + "kind" : "remoteSourceControl", + "location" : "https://github.com/maitbayev/iosMath.git", + "state" : { + "branch" : "master", + "revision" : "01ca7209675caa2bb899cfa8d13f94f910657254" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..145c18c --- /dev/null +++ b/Package.swift @@ -0,0 +1,40 @@ +// swift-tools-version: 5.6 + +import PackageDescription + +let package = Package( + name: "MathEditor", + defaultLocalization: "en", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "MathEditor", + targets: ["MathEditor"]) + ], + dependencies: [ + .package(url: "https://github.com/maitbayev/iosMath.git", branch: "master") + ], + targets: [ + .target( + name: "MathEditor", + dependencies: [.product(name: "iosMath", package: "iosMath")], + path: "./mathEditor", + resources: [.process("MathKeyboardResources")], + cSettings: [ + .headerSearchPath("./editor"), + .headerSearchPath("./keyboard"), + .headerSearchPath("./internal"), + ] + ), + .testTarget( + name: "MathEditorTests", + dependencies: ["MathEditor"], + path: "Tests", + cSettings: [ + .headerSearchPath("../mathEditor/editor"), + .headerSearchPath("../mathEditor/keyboard"), + .headerSearchPath("../mathEditor/internal"), + ] + ), + ] +) diff --git a/Tests/MTDisplayEditingTest.m b/Tests/MTDisplayEditingTest.m index 23adc74..f828b4f 100644 --- a/Tests/MTDisplayEditingTest.m +++ b/Tests/MTDisplayEditingTest.m @@ -17,7 +17,6 @@ #import "MTMathListBuilder.h" #import "MTFontManager.h" #import "MTTypesetter.h" - @interface MTDisplayEditingTest : XCTestCase @property (nonatomic) MTFont* font; diff --git a/mathEditor/MathKeyboardResources b/mathEditor/MathKeyboardResources new file mode 120000 index 0000000..4b9ef22 --- /dev/null +++ b/mathEditor/MathKeyboardResources @@ -0,0 +1 @@ +../MathKeyboardResources \ No newline at end of file diff --git a/mathEditor/editor/MTEditableMathLabel.h b/mathEditor/editor/MTEditableMathLabel.h index 209614d..cf39bbd 100644 --- a/mathEditor/editor/MTEditableMathLabel.h +++ b/mathEditor/editor/MTEditableMathLabel.h @@ -9,7 +9,7 @@ // #import -#import +#include "MTMathList.h" @class MTEditableMathLabel; @class MTMathListIndex; From d17230547001b36dceec65b96b8a685c7714a123 Mon Sep 17 00:00:00 2001 From: Madiyar Aitbayev Date: Mon, 11 Jul 2022 01:42:59 +0100 Subject: [PATCH 3/9] Fix when consumed from swift --- mathEditor/include/MTEditableMathLabel.h | 1 + mathEditor/include/module.modulemap | 6 ++++++ mathEditor/keyboard/MTMathKeyboardRootView.m | 3 +++ 3 files changed, 10 insertions(+) create mode 120000 mathEditor/include/MTEditableMathLabel.h create mode 100644 mathEditor/include/module.modulemap diff --git a/mathEditor/include/MTEditableMathLabel.h b/mathEditor/include/MTEditableMathLabel.h new file mode 120000 index 0000000..3482464 --- /dev/null +++ b/mathEditor/include/MTEditableMathLabel.h @@ -0,0 +1 @@ +../editor/MTEditableMathLabel.h \ No newline at end of file diff --git a/mathEditor/include/module.modulemap b/mathEditor/include/module.modulemap new file mode 100644 index 0000000..a4d7a86 --- /dev/null +++ b/mathEditor/include/module.modulemap @@ -0,0 +1,6 @@ +module MathEditor { + header "../editor/MTEditableMathLabel.h" + header "../keyboard/MTMathKeyboardRootView.h" + + export * +} diff --git a/mathEditor/keyboard/MTMathKeyboardRootView.m b/mathEditor/keyboard/MTMathKeyboardRootView.m index cdbb35f..77c1d5a 100644 --- a/mathEditor/keyboard/MTMathKeyboardRootView.m +++ b/mathEditor/keyboard/MTMathKeyboardRootView.m @@ -46,6 +46,9 @@ +(instancetype)sharedInstance { // Gets the math keyboard resources bundle +(NSBundle *)getMathKeyboardResourcesBundle { +#ifdef SWIFTPM_MODULE_BUNDLE + return SWIFTPM_MODULE_BUNDLE +#endif return [NSBundle bundleWithURL:[[NSBundle bundleForClass:[self class]] URLForResource:@"MTKeyboardResources" withExtension:@"bundle"]]; } From 0420ed1b454b64a0649d773cc3ab67bb04230e46 Mon Sep 17 00:00:00 2001 From: Madiyar Aitbayev Date: Mon, 11 Jul 2022 02:02:50 +0100 Subject: [PATCH 4/9] Fix build issue --- mathEditor/keyboard/MTMathKeyboardRootView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathEditor/keyboard/MTMathKeyboardRootView.m b/mathEditor/keyboard/MTMathKeyboardRootView.m index 77c1d5a..06696d0 100644 --- a/mathEditor/keyboard/MTMathKeyboardRootView.m +++ b/mathEditor/keyboard/MTMathKeyboardRootView.m @@ -47,7 +47,7 @@ +(instancetype)sharedInstance { +(NSBundle *)getMathKeyboardResourcesBundle { #ifdef SWIFTPM_MODULE_BUNDLE - return SWIFTPM_MODULE_BUNDLE + return SWIFTPM_MODULE_BUNDLE; #endif return [NSBundle bundleWithURL:[[NSBundle bundleForClass:[self class]] URLForResource:@"MTKeyboardResources" withExtension:@"bundle"]]; } From 745cc96cde5cbf60f4c435c2d527b8a5d917cc38 Mon Sep 17 00:00:00 2001 From: Madiyar Aitbayev Date: Sun, 20 Jul 2025 17:12:45 +0100 Subject: [PATCH 5/9] Migrate example to SPM --- MathEditor.xcodeproj/project.pbxproj | 242 +++++------------- .../contents.xcworkspacedata | 2 +- .../xcshareddata/swiftpm/Package.resolved | 15 ++ .../xcschemes/iosMathEditor-Example.xcscheme | 24 +- 4 files changed, 87 insertions(+), 196 deletions(-) create mode 100644 MathEditor.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/MathEditor.xcodeproj/project.pbxproj b/MathEditor.xcodeproj/project.pbxproj index e601607..593056d 100644 --- a/MathEditor.xcodeproj/project.pbxproj +++ b/MathEditor.xcodeproj/project.pbxproj @@ -3,13 +3,10 @@ archiveVersion = 1; classes = { }; - objectVersion = 47; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ - 1385A98064E559BF2F757304 /* libPods-MathEditor_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8FF6761D7D7AC0EC9F0679C9 /* libPods-MathEditor_Example.a */; }; - 2040F7C6A902C4AEF598B076 /* libPods-MathEditor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 473720D7C87DFE272F052861 /* libPods-MathEditor.a */; }; - 243FB02EE755A1D41861623B /* libPods-MathEditor_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 023479B03FDA39233191C9B7 /* libPods-MathEditor_Tests.a */; }; 490BE5781CE6A08100AE31A0 /* MTDisplayEditingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 490BE5771CE6A08100AE31A0 /* MTDisplayEditingTest.m */; }; 49DEC8241CF5523E000053CD /* MTCaretView.m in Sources */ = {isa = PBXBuildFile; fileRef = 49DEC81F1CF5523E000053CD /* MTCaretView.m */; }; 49DEC8251CF5523E000053CD /* MTDisplay+Editing.m in Sources */ = {isa = PBXBuildFile; fileRef = 49DEC8211CF5523E000053CD /* MTDisplay+Editing.m */; }; @@ -29,6 +26,7 @@ 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; + 862D28DD2E2D4C4400F9B6FE /* MathEditor in Frameworks */ = {isa = PBXBuildFile; productRef = 862D28DC2E2D4C4400F9B6FE /* MathEditor */; }; 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; /* End PBXBuildFile section */ @@ -45,10 +43,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 023479B03FDA39233191C9B7 /* libPods-MathEditor_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MathEditor_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 09D14643E1EDE3F6786E897E /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - 1377C04C01CE56EB11AB5A1B /* Pods-MathEditor.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MathEditor.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MathEditor/Pods-MathEditor.debug.xcconfig"; sourceTree = ""; }; - 473720D7C87DFE272F052861 /* libPods-MathEditor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MathEditor.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 490BE5561CE695CC00AE31A0 /* libMathEditor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMathEditor.a; sourceTree = BUILT_PRODUCTS_DIR; }; 490BE5771CE6A08100AE31A0 /* MTDisplayEditingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTDisplayEditingTest.m; sourceTree = ""; }; 497F92211CF8CBFF00022162 /* MathEditor-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MathEditor-Prefix.pch"; sourceTree = ""; }; @@ -74,7 +69,6 @@ 49DEC83D1CF5591D000053CD /* WhiteBGKeyboardTab.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = WhiteBGKeyboardTab.xcassets; sourceTree = ""; }; 49DEC83E1CF57D75000053CD /* lmroman10-bolditalic.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "lmroman10-bolditalic.otf"; sourceTree = ""; }; 49DEC83F1CF59F82000053CD /* MathEditor.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = MathEditor.podspec; sourceTree = ""; }; - 5628D2459CDCF8D3064ABC73 /* libPods-iosMathEditor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-iosMathEditor.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 6003F58A195388D20070C39A /* MathEditor_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MathEditor_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -92,16 +86,8 @@ 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; - 733BAF45E72F86EDFEAAAD61 /* libPods-iosMathEditor_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-iosMathEditor_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 753F7D8158AE6B036B248A96 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - 7A378091F23FA26A8EEA2F82 /* Pods-MathEditor_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MathEditor_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-MathEditor_Example/Pods-MathEditor_Example.release.xcconfig"; sourceTree = ""; }; 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; - 8A93C35286D2F42BBFFF6281 /* Pods-MathEditor.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MathEditor.release.xcconfig"; path = "Pods/Target Support Files/Pods-MathEditor/Pods-MathEditor.release.xcconfig"; sourceTree = ""; }; - 8FF6761D7D7AC0EC9F0679C9 /* libPods-MathEditor_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MathEditor_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A4EC35D984BA58883006D2C3 /* Pods-MathEditor_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MathEditor_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-MathEditor_Tests/Pods-MathEditor_Tests.release.xcconfig"; sourceTree = ""; }; - AA22ED6294D4E5576093F8A8 /* Pods-MathEditor_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MathEditor_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MathEditor_Tests/Pods-MathEditor_Tests.debug.xcconfig"; sourceTree = ""; }; - AEA5AA8AF2C91D3A7B9B05F9 /* libPods-iosMathEditor_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-iosMathEditor_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - C22335FDD0B9F56B94B8187A /* Pods-MathEditor_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MathEditor_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MathEditor_Example/Pods-MathEditor_Example.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -109,7 +95,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2040F7C6A902C4AEF598B076 /* libPods-MathEditor.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -120,7 +105,7 @@ 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, - 1385A98064E559BF2F757304 /* libPods-MathEditor_Example.a in Frameworks */, + 862D28DD2E2D4C4400F9B6FE /* MathEditor in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -131,7 +116,6 @@ 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, - 243FB02EE755A1D41861623B /* libPods-MathEditor_Tests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -199,19 +183,6 @@ path = ../MathKeyboardResources; sourceTree = ""; }; - 4D5F9F41E950A502FB2B3BEA /* Pods */ = { - isa = PBXGroup; - children = ( - 1377C04C01CE56EB11AB5A1B /* Pods-MathEditor.debug.xcconfig */, - 8A93C35286D2F42BBFFF6281 /* Pods-MathEditor.release.xcconfig */, - C22335FDD0B9F56B94B8187A /* Pods-MathEditor_Example.debug.xcconfig */, - 7A378091F23FA26A8EEA2F82 /* Pods-MathEditor_Example.release.xcconfig */, - AA22ED6294D4E5576093F8A8 /* Pods-MathEditor_Tests.debug.xcconfig */, - A4EC35D984BA58883006D2C3 /* Pods-MathEditor_Tests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; 6003F581195388D10070C39A = { isa = PBXGroup; children = ( @@ -221,7 +192,6 @@ 490BE5571CE695CC00AE31A0 /* mathEditor */, 6003F58C195388D20070C39A /* Frameworks */, 6003F58B195388D20070C39A /* Products */, - 4D5F9F41E950A502FB2B3BEA /* Pods */, ); sourceTree = ""; }; @@ -242,12 +212,6 @@ 6003F58F195388D20070C39A /* CoreGraphics.framework */, 6003F591195388D20070C39A /* UIKit.framework */, 6003F5AF195388D20070C39A /* XCTest.framework */, - 5628D2459CDCF8D3064ABC73 /* libPods-iosMathEditor.a */, - 733BAF45E72F86EDFEAAAD61 /* libPods-iosMathEditor_Example.a */, - AEA5AA8AF2C91D3A7B9B05F9 /* libPods-iosMathEditor_Tests.a */, - 473720D7C87DFE272F052861 /* libPods-MathEditor.a */, - 8FF6761D7D7AC0EC9F0679C9 /* libPods-MathEditor_Example.a */, - 023479B03FDA39233191C9B7 /* libPods-MathEditor_Tests.a */, ); name = Frameworks; sourceTree = ""; @@ -313,11 +277,9 @@ isa = PBXNativeTarget; buildConfigurationList = 490BE55E1CE695CC00AE31A0 /* Build configuration list for PBXNativeTarget "MathEditor" */; buildPhases = ( - 48A9CBFCAB5894F9BFC552E4 /* [CP] Check Pods Manifest.lock */, 490BE5521CE695CC00AE31A0 /* Sources */, 490BE5531CE695CC00AE31A0 /* Frameworks */, 490BE5541CE695CC00AE31A0 /* CopyFiles */, - 4C3A2645A6B5FE31FA662BF1 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -332,12 +294,9 @@ isa = PBXNativeTarget; buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "MathEditor_Example" */; buildPhases = ( - A3E2D0D1A985C3FEA5864005 /* [CP] Check Pods Manifest.lock */, 6003F586195388D20070C39A /* Sources */, 6003F587195388D20070C39A /* Frameworks */, 6003F588195388D20070C39A /* Resources */, - D8A5CFAD5F09AAA428AB4D10 /* [CP] Embed Pods Frameworks */, - E202BD0EA2A01E97CAF04F2E /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -352,12 +311,9 @@ isa = PBXNativeTarget; buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "MathEditor_Tests" */; buildPhases = ( - 4B44B263AD3BCE039EE8DD71 /* [CP] Check Pods Manifest.lock */, 6003F5AA195388D20070C39A /* Sources */, 6003F5AB195388D20070C39A /* Frameworks */, 6003F5AC195388D20070C39A /* Resources */, - E5084554A0ECA0F3755B8CC7 /* [CP] Embed Pods Frameworks */, - 02495CB9EE6CCCBF5814B5C0 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -374,8 +330,9 @@ 6003F582195388D10070C39A /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; CLASSPREFIX = MT; - LastUpgradeCheck = 0720; + LastUpgradeCheck = 1640; ORGANIZATIONNAME = "Kostub Deshmukh"; TargetAttributes = { 490BE5551CE695CC00AE31A0 = { @@ -388,10 +345,14 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); mainGroup = 6003F581195388D10070C39A; + packageReferences = ( + 862D28DB2E2D4C4400F9B6FE /* XCLocalSwiftPackageReference "../MathEditor" */, + ); productRefGroup = 6003F58B195388D20070C39A /* Products */; projectDirPath = ""; projectRoot = ""; @@ -424,129 +385,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 02495CB9EE6CCCBF5814B5C0 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MathEditor_Tests/Pods-MathEditor_Tests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 48A9CBFCAB5894F9BFC552E4 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../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"; - showEnvVarsInLog = 0; - }; - 4B44B263AD3BCE039EE8DD71 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../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"; - showEnvVarsInLog = 0; - }; - 4C3A2645A6B5FE31FA662BF1 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MathEditor/Pods-MathEditor-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - A3E2D0D1A985C3FEA5864005 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../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"; - showEnvVarsInLog = 0; - }; - D8A5CFAD5F09AAA428AB4D10 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MathEditor_Example/Pods-MathEditor_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - E202BD0EA2A01E97CAF04F2E /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MathEditor_Example/Pods-MathEditor_Example-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - E5084554A0ECA0F3755B8CC7 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MathEditor_Tests/Pods-MathEditor_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 490BE5521CE695CC00AE31A0 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -603,13 +441,12 @@ /* Begin XCBuildConfiguration section */ 490BE55C1CE695CC00AE31A0 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1377C04C01CE56EB11AB5A1B /* Pods-MathEditor.debug.xcconfig */; buildSettings = { CLANG_WARN_UNREACHABLE_CODE = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ( "$(inherited)", @@ -622,14 +459,13 @@ }; 490BE55D1CE695CC00AE31A0 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8A93C35286D2F42BBFFF6281 /* Pods-MathEditor.release.xcconfig */; buildSettings = { CLANG_WARN_UNREACHABLE_CODE = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ( "$(inherited)", @@ -644,23 +480,39 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -673,7 +525,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -684,29 +536,45 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; @@ -715,11 +583,11 @@ }; 6003F5C0195388D20070C39A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C22335FDD0B9F56B94B8187A /* Pods-MathEditor_Example.debug.xcconfig */; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MathEditorExample/MathEditor-Prefix.pch"; INFOPLIST_FILE = "$(SRCROOT)/MathEditorExample/iosMathEditor-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12; PRODUCT_BUNDLE_IDENTIFIER = MathChat.MathEditorExample; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; @@ -728,11 +596,11 @@ }; 6003F5C1195388D20070C39A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7A378091F23FA26A8EEA2F82 /* Pods-MathEditor_Example.release.xcconfig */; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MathEditorExample/MathEditor-Prefix.pch"; INFOPLIST_FILE = "$(SRCROOT)/MathEditorExample/iosMathEditor-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12; PRODUCT_BUNDLE_IDENTIFIER = MathChat.MathEditorExample; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; @@ -741,7 +609,6 @@ }; 6003F5C3195388D20070C39A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AA22ED6294D4E5576093F8A8 /* Pods-MathEditor_Tests.debug.xcconfig */; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; @@ -765,7 +632,6 @@ }; 6003F5C4195388D20070C39A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A4EC35D984BA58883006D2C3 /* Pods-MathEditor_Tests.release.xcconfig */; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; @@ -823,6 +689,20 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 862D28DB2E2D4C4400F9B6FE /* XCLocalSwiftPackageReference "../MathEditor" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../MathEditor; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 862D28DC2E2D4C4400F9B6FE /* MathEditor */ = { + isa = XCSwiftPackageProductDependency; + productName = MathEditor; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 6003F582195388D10070C39A /* Project object */; } diff --git a/MathEditor.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MathEditor.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 6228eeb..919434a 100644 --- a/MathEditor.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/MathEditor.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/MathEditor.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/MathEditor.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..2efe63d --- /dev/null +++ b/MathEditor.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "3845228a2da848133f1c5b0fe02201c5631261188fc4a1a940a392278f808293", + "pins" : [ + { + "identity" : "iosmath", + "kind" : "remoteSourceControl", + "location" : "https://github.com/maitbayev/iosMath.git", + "state" : { + "branch" : "master", + "revision" : "066ba2f8353782a644889efe9ceb884ea844180b" + } + } + ], + "version" : 3 +} diff --git a/MathEditor.xcodeproj/xcshareddata/xcschemes/iosMathEditor-Example.xcscheme b/MathEditor.xcodeproj/xcshareddata/xcschemes/iosMathEditor-Example.xcscheme index 6ca118a..ba87031 100644 --- a/MathEditor.xcodeproj/xcshareddata/xcschemes/iosMathEditor-Example.xcscheme +++ b/MathEditor.xcodeproj/xcshareddata/xcschemes/iosMathEditor-Example.xcscheme @@ -1,6 +1,6 @@ + + + + @@ -39,17 +48,6 @@ - - - - - - - - Date: Sun, 20 Jul 2025 21:51:07 +0100 Subject: [PATCH 6/9] Add SwiftUIExample --- .../project.pbxproj | 376 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/swiftpm/Package.resolved | 15 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 85 ++++ .../Assets.xcassets/Contents.json | 6 + .../ContentView.swift | 49 +++ .../MathEditorSwiftUIExample.entitlements | 10 + .../MathEditorSwiftUIExampleApp.swift | 12 + 9 files changed, 571 insertions(+) create mode 100644 MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.pbxproj create mode 100644 MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/Contents.json create mode 100644 MathEditorSwiftUIExample/MathEditorSwiftUIExample/ContentView.swift create mode 100644 MathEditorSwiftUIExample/MathEditorSwiftUIExample/MathEditorSwiftUIExample.entitlements create mode 100644 MathEditorSwiftUIExample/MathEditorSwiftUIExample/MathEditorSwiftUIExampleApp.swift diff --git a/MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.pbxproj b/MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9b98a5d --- /dev/null +++ b/MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.pbxproj @@ -0,0 +1,376 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 862D28F82E2D525900F9B6FE /* MathEditor in Frameworks */ = {isa = PBXBuildFile; productRef = 862D28F72E2D525900F9B6FE /* MathEditor */; }; + 862D28FB2E2D527100F9B6FE /* MathEditor in Frameworks */ = {isa = PBXBuildFile; productRef = 862D28FA2E2D527100F9B6FE /* MathEditor */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 862D28E72E2D51E100F9B6FE /* MathEditorSwiftUIExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MathEditorSwiftUIExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 862D28E92E2D51E100F9B6FE /* MathEditorSwiftUIExample */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = MathEditorSwiftUIExample; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 862D28E42E2D51E100F9B6FE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 862D28F82E2D525900F9B6FE /* MathEditor in Frameworks */, + 862D28FB2E2D527100F9B6FE /* MathEditor in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 862D28DE2E2D51E100F9B6FE = { + isa = PBXGroup; + children = ( + 862D28E92E2D51E100F9B6FE /* MathEditorSwiftUIExample */, + 862D28E82E2D51E100F9B6FE /* Products */, + ); + sourceTree = ""; + }; + 862D28E82E2D51E100F9B6FE /* Products */ = { + isa = PBXGroup; + children = ( + 862D28E72E2D51E100F9B6FE /* MathEditorSwiftUIExample.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 862D28E62E2D51E100F9B6FE /* MathEditorSwiftUIExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 862D28F32E2D51E200F9B6FE /* Build configuration list for PBXNativeTarget "MathEditorSwiftUIExample" */; + buildPhases = ( + 862D28E32E2D51E100F9B6FE /* Sources */, + 862D28E42E2D51E100F9B6FE /* Frameworks */, + 862D28E52E2D51E100F9B6FE /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 862D28E92E2D51E100F9B6FE /* MathEditorSwiftUIExample */, + ); + name = MathEditorSwiftUIExample; + packageProductDependencies = ( + 862D28F72E2D525900F9B6FE /* MathEditor */, + 862D28FA2E2D527100F9B6FE /* MathEditor */, + ); + productName = MathEditorSwiftUIExample; + productReference = 862D28E72E2D51E100F9B6FE /* MathEditorSwiftUIExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 862D28DF2E2D51E100F9B6FE /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1640; + LastUpgradeCheck = 1640; + TargetAttributes = { + 862D28E62E2D51E100F9B6FE = { + CreatedOnToolsVersion = 16.4; + }; + }; + }; + buildConfigurationList = 862D28E22E2D51E100F9B6FE /* Build configuration list for PBXProject "MathEditorSwiftUIExample" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 862D28DE2E2D51E100F9B6FE; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + 862D28F92E2D527100F9B6FE /* XCLocalSwiftPackageReference "../../MathEditor" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = 862D28E82E2D51E100F9B6FE /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 862D28E62E2D51E100F9B6FE /* MathEditorSwiftUIExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 862D28E52E2D51E100F9B6FE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 862D28E32E2D51E100F9B6FE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 862D28F12E2D51E200F9B6FE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = BT9948YGAL; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 862D28F22E2D51E200F9B6FE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = BT9948YGAL; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + }; + name = Release; + }; + 862D28F42E2D51E200F9B6FE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = MathEditorSwiftUIExample/MathEditorSwiftUIExample.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = BT9948YGAL; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 14; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 11; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = matheditor.MathEditorSwiftUIExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + REGISTER_APP_GROUPS = YES; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + XROS_DEPLOYMENT_TARGET = 2.5; + }; + name = Debug; + }; + 862D28F52E2D51E200F9B6FE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = MathEditorSwiftUIExample/MathEditorSwiftUIExample.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = BT9948YGAL; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 14; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 11; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = matheditor.MathEditorSwiftUIExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + REGISTER_APP_GROUPS = YES; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + XROS_DEPLOYMENT_TARGET = 2.5; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 862D28E22E2D51E100F9B6FE /* Build configuration list for PBXProject "MathEditorSwiftUIExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 862D28F12E2D51E200F9B6FE /* Debug */, + 862D28F22E2D51E200F9B6FE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 862D28F32E2D51E200F9B6FE /* Build configuration list for PBXNativeTarget "MathEditorSwiftUIExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 862D28F42E2D51E200F9B6FE /* Debug */, + 862D28F52E2D51E200F9B6FE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 862D28F92E2D527100F9B6FE /* XCLocalSwiftPackageReference "../../MathEditor" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../../MathEditor; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 862D28F72E2D525900F9B6FE /* MathEditor */ = { + isa = XCSwiftPackageProductDependency; + productName = MathEditor; + }; + 862D28FA2E2D527100F9B6FE /* MathEditor */ = { + isa = XCSwiftPackageProductDependency; + productName = MathEditor; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 862D28DF2E2D51E100F9B6FE /* Project object */; +} diff --git a/MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..2efe63d --- /dev/null +++ b/MathEditorSwiftUIExample/MathEditorSwiftUIExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "3845228a2da848133f1c5b0fe02201c5631261188fc4a1a940a392278f808293", + "pins" : [ + { + "identity" : "iosmath", + "kind" : "remoteSourceControl", + "location" : "https://github.com/maitbayev/iosMath.git", + "state" : { + "branch" : "master", + "revision" : "066ba2f8353782a644889efe9ceb884ea844180b" + } + } + ], + "version" : 3 +} diff --git a/MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/AccentColor.colorset/Contents.json b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..ffdfe15 --- /dev/null +++ b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,85 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/Contents.json b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MathEditorSwiftUIExample/MathEditorSwiftUIExample/ContentView.swift b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/ContentView.swift new file mode 100644 index 0000000..8691bb7 --- /dev/null +++ b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/ContentView.swift @@ -0,0 +1,49 @@ +// Copyright © 2025 Snap, Inc. All rights reserved. + +import SwiftUI +import MathEditor + +struct ContentView: View { + var body: some View { + MathEditorView() + .padding() + } +} + +#Preview { + ContentView() +} + +#if os(iOS) +struct MathEditorView : UIViewRepresentable { + typealias UIViewType = MTEditableMathLabel + + func makeUIView(context: Context) -> MTEditableMathLabel { + let mathLabel = MTEditableMathLabel() + mathLabel.keyboard = MTMathKeyboardRootView.sharedInstance() + mathLabel.backgroundColor = .clear + return mathLabel + } + + func updateUIView(_ uiView: MTEditableMathLabel, context: Context) { + + } +} +#endif + +#if os(macOS) +struct MathEditorView : NSViewRepresentable { + typealias NSViewType = MTEditableMathLabel + + func makeNSView(context: Context) -> MTEditableMathLabel { + let mathLabel = MTEditableMathLabel() + mathLabel.keyboard = MTMathKeyboardRootView.sharedInstance() + mathLabel.backgroundColor = .clear + return mathLabel + } + + func updateNSView(_ uiView: MTEditableMathLabel, context: Context) { + + } +} +#endif diff --git a/MathEditorSwiftUIExample/MathEditorSwiftUIExample/MathEditorSwiftUIExample.entitlements b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/MathEditorSwiftUIExample.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/MathEditorSwiftUIExample.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/MathEditorSwiftUIExample/MathEditorSwiftUIExample/MathEditorSwiftUIExampleApp.swift b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/MathEditorSwiftUIExampleApp.swift new file mode 100644 index 0000000..7aa66b6 --- /dev/null +++ b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/MathEditorSwiftUIExampleApp.swift @@ -0,0 +1,12 @@ +// Copyright © 2025 Snap, Inc. All rights reserved. + +import SwiftUI + +@main +struct MathEditorSwiftUIExampleApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} From 44f8830a4a2fa3cf7f7fbca9318a978384c52a0d Mon Sep 17 00:00:00 2001 From: Madiyar Aitbayev Date: Sun, 20 Jul 2025 23:02:44 +0100 Subject: [PATCH 7/9] Refactor out MathKeyboard --- .../MathEditorSwiftUIExample/ContentView.swift | 1 + Package.swift | 13 ++++++++++--- mathEditor/MathKeyboardResources | 1 - mathEditor/include/module.modulemap | 6 ------ .../back-arrow-disabled.imageset/Contents.json | 0 .../left arrow disabled 1x.png | Bin .../left arrow disabled 2x.png | Bin .../left arrow disabled 3x.png | Bin .../back-arrow.imageset/Contents.json | 0 .../back-arrow.imageset/left arrow 1x.png | Bin .../back-arrow.imageset/left arrow 2x.png | Bin .../back-arrow.imageset/left arrow 3x.png | Bin .../blue-button-highlighted.imageset/Contents.json | 0 .../blue-pressed.png | Bin .../front-arrow-disabled.imageset/Contents.json | 0 .../right arrow disabled 1x.png | Bin .../right arrow disabled 2x.png | Bin .../right arrow disabled 3x.png | Bin .../front-arrow.imageset/Contents.json | 0 .../front-arrow.imageset/right arrow 1x.png | Bin .../front-arrow.imageset/right arrow 2x.png | Bin .../front-arrow.imageset/right arrow 3x.png | Bin .../grey-button-disabled.imageset/Contents.json | 0 .../grey-button-disabled.png | Bin .../grey-button-highlighted.imageset/Contents.json | 0 .../keyboard-grey-pressed.png | Bin .../ipad-background.imageset/Contents.json | 0 .../ipad-background.imageset/ipad-keyboard1x.png | Bin .../ipad-background.imageset/ipad-keyboard2x.png | Bin .../iphone-background.imageset/Contents.json | 0 .../keyboard-background1x.png | Bin .../keyboard-background2x.png | Bin .../kb-dark-blue-pressed.imageset/Contents.json | 0 .../kb-dark-blue-pressed.png | Bin .../Contents.json | 0 .../kb-slide-button-pressed.png | Bin .../keyboard-slide-bg1.imageset/Contents.json | 0 .../keyboard-slide11x.png | Bin .../keyboard-slide12x.png | Bin .../keyboard-slide-bg2.imageset/Contents.json | 0 .../keyboard-slide21x.png | Bin .../keyboard-slide22x.png | Bin .../keyboard-slide-bg3.imageset/Contents.json | 0 .../keyboard-slide31x.png | Bin .../keyboard-slide32x.png | Bin .../Contents.json | 0 .../multiplication1x.png | Bin .../multiplication2x-ipad.png | Bin .../Contents.json | 0 .../multiplication1x-iphone.png | Bin .../multiplication2x-iphone.png | Bin .../num-button-disabled.imageset/Contents.json | 0 .../grey-button-disabled.png | Bin .../num-button-highlighted.imageset/Contents.json | 0 .../keyboard-num-pressed.png | Bin .../Contents.json | 0 .../keyboard-orange-pressed.png | Bin .../MathKeyboardResources}/MTKeyboard.xib | 0 .../MathKeyboardResources}/MTKeyboardTab2.xib | 0 .../MathKeyboardResources}/MTKeyboardTab3.xib | 0 .../MathKeyboardResources}/MTKeyboardTab4.xib | 0 .../MTMathKeyboardRootView.xib | 0 .../Backspace Small.imageset/Backspace Small.pdf | Bin .../Backspace Small.imageset/Contents.json | 0 .../Backspace.imageset/Backspace.pdf | Bin .../Backspace.imageset/Contents.json | 0 .../Exponent.imageset/Contents.json | 0 .../Exponent.imageset/Exponent.pdf | Bin .../Fraction.imageset/Contents.json | 0 .../Fraction.imageset/Fraction.pdf | Bin .../Functions Keyboard.imageset/Contents.json | 0 .../Functions Keyboard.pdf | Bin .../Functions Symbol.imageset/Contents.json | 0 .../Functions Symbol.imageset/Functions Symbol.pdf | Bin .../Keyboard Down.imageset/Contents.json | 0 .../Keyboard Down.imageset/Keyboard Down.pdf | Bin .../Keyboard-azure-pressed.imageset/Contents.json | 0 .../Keyboard-azure-pressed.pdf | Bin .../Keyboard-green-pressed.imageset/Contents.json | 0 .../Keyboard-green-pressed.pdf | Bin .../Keyboard-grey-pressed.imageset/Contents.json | 0 .../Keyboard-grey-pressed.pdf | Bin .../Keyboard-marine-pressed.imageset/Contents.json | 0 .../Keyboard-marine-pressed.pdf | Bin .../Keyboard-orange-pressed.imageset/Contents.json | 0 .../Keyboard-orange-pressed.pdf | Bin .../Letter Symbol.imageset/Contents.json | 0 .../Letter Symbol.imageset/Letter Symbol.pdf | Bin .../Letters Keyboard.imageset/Contents.json | 0 .../Letters Keyboard.imageset/Letters Keyboard.pdf | Bin .../Log Inverted.imageset/Contents.json | 0 .../Log Inverted.imageset/Log Inverted.pdf | Bin .../Log with base.imageset/Contents.json | 0 .../Log with base.imageset/Log with base.pdf | Bin .../Number Symbol.imageset/Contents.json | 0 .../Number Symbol.imageset/Number Symbol.pdf | Bin .../Numbers Keyboard.imageset/Contents.json | 0 .../Numbers Keyboard.imageset/Numbers Keyboard.pdf | Bin .../Operations Keyboard.imageset/Contents.json | 0 .../Operations Keyboard.pdf | Bin .../Operations Symbol.imageset/Contents.json | 0 .../Operations Symbol.pdf | Bin .../Shift.imageset/Contents.json | 0 .../Shift.imageset/Shift.pdf | Bin .../Sqrt Inverted.imageset/Contents.json | 0 .../Sqrt Inverted.imageset/Sqrt White Fixed.pdf | Bin .../Sqrt Power Inverted.imageset/Contents.json | 0 .../Sqrt Power Inverted.pdf | Bin .../Sqrt with Power.imageset/Contents.json | 0 .../Sqrt with Power.imageset/Sqrt with Power.pdf | Bin .../Sqrt.imageset/Contents.json | 0 .../Sqrt.imageset/Sqrt.pdf | Bin .../Subscript Inverted.imageset/Contents.json | 0 .../Subscript Inverted.pdf | Bin .../Subscript.imageset/Contents.json | 0 .../Subscript.imageset/Subscript.pdf | Bin .../Functions Symbol wbg.imageset/Contents.json | 0 .../Functions Symbol.pdf | Bin .../Letter Symbol wbg.imageset/Contents.json | 0 .../Letter Symbol wbg.imageset/Letter Symbol.pdf | Bin .../Numbers Symbol wbg.imageset/Contents.json | 0 .../Numbers Symbol wbg.imageset/Numbers Symbol.pdf | Bin .../Operations Symbol wbg.imageset/Contents.json | 0 .../Operations Symbol.pdf | Bin .../lmroman10-bolditalic.otf | Bin mathKeyboard/include/module.modulemap | 5 +++++ {mathEditor => mathKeyboard}/keyboard/MTKeyboard.h | 0 {mathEditor => mathKeyboard}/keyboard/MTKeyboard.m | 3 +-- .../keyboard/MTMathKeyboardRootView.h | 0 .../keyboard/MTMathKeyboardRootView.m | 3 --- 130 files changed, 17 insertions(+), 15 deletions(-) delete mode 120000 mathEditor/MathKeyboardResources delete mode 100644 mathEditor/include/module.modulemap rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/back-arrow-disabled.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 1x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 2x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 3x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/back-arrow.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 1x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 2x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 3x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/blue-button-highlighted.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/blue-button-highlighted.imageset/blue-pressed.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/front-arrow-disabled.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 1x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 2x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 3x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/front-arrow.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 1x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 2x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 3x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/grey-button-disabled.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/grey-button-disabled.imageset/grey-button-disabled.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/grey-button-highlighted.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/grey-button-highlighted.imageset/keyboard-grey-pressed.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/ipad-background.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/ipad-background.imageset/ipad-keyboard1x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/ipad-background.imageset/ipad-keyboard2x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/iphone-background.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/iphone-background.imageset/keyboard-background1x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/iphone-background.imageset/keyboard-background2x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/kb-dark-blue-pressed.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/kb-dark-blue-pressed.imageset/kb-dark-blue-pressed.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/kbslide-button-highlighted.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/kbslide-button-highlighted.imageset/kb-slide-button-pressed.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/keyboard-slide11x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/keyboard-slide12x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/keyboard-slide21x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/keyboard-slide22x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/keyboard-slide31x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/keyboard-slide32x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/multiplication1x.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/multiplication2x-ipad.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/multiplication1x-iphone.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/multiplication2x-iphone.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/num-button-disabled.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/num-button-disabled.imageset/grey-button-disabled.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/num-button-highlighted.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/num-button-highlighted.imageset/keyboard-num-pressed.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/orange-button-highlighted.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/KeyboardAssests.xcassets/orange-button-highlighted.imageset/keyboard-orange-pressed.png (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/MTKeyboard.xib (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/MTKeyboardTab2.xib (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/MTKeyboardTab3.xib (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/MTKeyboardTab4.xib (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/MTMathKeyboardRootView.xib (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Backspace Small.imageset/Backspace Small.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Backspace Small.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Backspace.imageset/Backspace.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Backspace.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Exponent.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Exponent.imageset/Exponent.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Fraction.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Fraction.imageset/Fraction.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Functions Keyboard.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Functions Keyboard.imageset/Functions Keyboard.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Functions Symbol.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Functions Symbol.imageset/Functions Symbol.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard Down.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard Down.imageset/Keyboard Down.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard-azure-pressed.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard-azure-pressed.imageset/Keyboard-azure-pressed.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard-green-pressed.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard-green-pressed.imageset/Keyboard-green-pressed.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard-grey-pressed.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard-grey-pressed.imageset/Keyboard-grey-pressed.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard-marine-pressed.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard-marine-pressed.imageset/Keyboard-marine-pressed.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard-orange-pressed.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Keyboard-orange-pressed.imageset/Keyboard-orange-pressed.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Letter Symbol.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Letter Symbol.imageset/Letter Symbol.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Letters Keyboard.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Letters Keyboard.imageset/Letters Keyboard.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Log Inverted.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Log Inverted.imageset/Log Inverted.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Log with base.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Log with base.imageset/Log with base.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Number Symbol.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Number Symbol.imageset/Number Symbol.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Numbers Keyboard.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Numbers Keyboard.imageset/Numbers Keyboard.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Operations Keyboard.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Operations Keyboard.imageset/Operations Keyboard.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Operations Symbol.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Operations Symbol.imageset/Operations Symbol.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Shift.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Shift.imageset/Shift.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Sqrt Inverted.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Sqrt Inverted.imageset/Sqrt White Fixed.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Sqrt Power Inverted.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Sqrt Power Inverted.imageset/Sqrt Power Inverted.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Sqrt with Power.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Sqrt with Power.imageset/Sqrt with Power.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Sqrt.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Sqrt.imageset/Sqrt.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Subscript Inverted.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Subscript Inverted.imageset/Subscript Inverted.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Subscript.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/NewKeyboardAssets.xcassets/Subscript.imageset/Subscript.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/WhiteBGKeyboardTab.xcassets/Functions Symbol wbg.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/WhiteBGKeyboardTab.xcassets/Functions Symbol wbg.imageset/Functions Symbol.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/WhiteBGKeyboardTab.xcassets/Letter Symbol wbg.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/WhiteBGKeyboardTab.xcassets/Letter Symbol wbg.imageset/Letter Symbol.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/WhiteBGKeyboardTab.xcassets/Numbers Symbol wbg.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/WhiteBGKeyboardTab.xcassets/Numbers Symbol wbg.imageset/Numbers Symbol.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/WhiteBGKeyboardTab.xcassets/Operations Symbol wbg.imageset/Contents.json (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/WhiteBGKeyboardTab.xcassets/Operations Symbol wbg.imageset/Operations Symbol.pdf (100%) rename {MathKeyboardResources => mathKeyboard/MathKeyboardResources}/lmroman10-bolditalic.otf (100%) create mode 100644 mathKeyboard/include/module.modulemap rename {mathEditor => mathKeyboard}/keyboard/MTKeyboard.h (100%) rename {mathEditor => mathKeyboard}/keyboard/MTKeyboard.m (98%) rename {mathEditor => mathKeyboard}/keyboard/MTMathKeyboardRootView.h (100%) rename {mathEditor => mathKeyboard}/keyboard/MTMathKeyboardRootView.m (97%) diff --git a/MathEditorSwiftUIExample/MathEditorSwiftUIExample/ContentView.swift b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/ContentView.swift index 8691bb7..01748bf 100644 --- a/MathEditorSwiftUIExample/MathEditorSwiftUIExample/ContentView.swift +++ b/MathEditorSwiftUIExample/MathEditorSwiftUIExample/ContentView.swift @@ -2,6 +2,7 @@ import SwiftUI import MathEditor +import MathKeyboard struct ContentView: View { var body: some View { diff --git a/Package.swift b/Package.swift index 145c18c..860e8a3 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let package = Package( products: [ .library( name: "MathEditor", - targets: ["MathEditor"]) + targets: ["MathEditor", "MathKeyboard"]) ], dependencies: [ .package(url: "https://github.com/maitbayev/iosMath.git", branch: "master") @@ -19,13 +19,20 @@ let package = Package( name: "MathEditor", dependencies: [.product(name: "iosMath", package: "iosMath")], path: "./mathEditor", - resources: [.process("MathKeyboardResources")], cSettings: [ .headerSearchPath("./editor"), - .headerSearchPath("./keyboard"), .headerSearchPath("./internal"), ] ), + .target( + name: "MathKeyboard", + dependencies: [.product(name: "iosMath", package: "iosMath"), "MathEditor"], + path: "./mathKeyboard", + resources: [.process("MathKeyboardResources")], + cSettings: [ + .headerSearchPath("./keyboard"), + ] + ), .testTarget( name: "MathEditorTests", dependencies: ["MathEditor"], diff --git a/mathEditor/MathKeyboardResources b/mathEditor/MathKeyboardResources deleted file mode 120000 index 4b9ef22..0000000 --- a/mathEditor/MathKeyboardResources +++ /dev/null @@ -1 +0,0 @@ -../MathKeyboardResources \ No newline at end of file diff --git a/mathEditor/include/module.modulemap b/mathEditor/include/module.modulemap deleted file mode 100644 index a4d7a86..0000000 --- a/mathEditor/include/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -module MathEditor { - header "../editor/MTEditableMathLabel.h" - header "../keyboard/MTMathKeyboardRootView.h" - - export * -} diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 1x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 1x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 1x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 1x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 2x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 2x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 2x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 2x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 3x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 3x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 3x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow-disabled.imageset/left arrow disabled 3x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 1x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 1x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 1x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 1x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 2x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 2x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 2x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 2x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 3x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 3x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 3x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/back-arrow.imageset/left arrow 3x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/blue-button-highlighted.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/blue-button-highlighted.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/blue-button-highlighted.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/blue-button-highlighted.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/blue-button-highlighted.imageset/blue-pressed.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/blue-button-highlighted.imageset/blue-pressed.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/blue-button-highlighted.imageset/blue-pressed.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/blue-button-highlighted.imageset/blue-pressed.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 1x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 1x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 1x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 1x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 2x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 2x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 2x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 2x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 3x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 3x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 3x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow-disabled.imageset/right arrow disabled 3x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 1x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 1x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 1x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 1x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 2x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 2x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 2x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 2x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 3x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 3x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 3x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/front-arrow.imageset/right arrow 3x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-disabled.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-disabled.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/grey-button-disabled.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-disabled.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-disabled.imageset/grey-button-disabled.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-disabled.imageset/grey-button-disabled.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/grey-button-disabled.imageset/grey-button-disabled.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-disabled.imageset/grey-button-disabled.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-highlighted.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-highlighted.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/grey-button-highlighted.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-highlighted.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-highlighted.imageset/keyboard-grey-pressed.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-highlighted.imageset/keyboard-grey-pressed.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/grey-button-highlighted.imageset/keyboard-grey-pressed.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/grey-button-highlighted.imageset/keyboard-grey-pressed.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/ipad-keyboard1x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/ipad-keyboard1x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/ipad-keyboard1x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/ipad-keyboard1x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/ipad-keyboard2x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/ipad-keyboard2x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/ipad-keyboard2x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/ipad-background.imageset/ipad-keyboard2x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/keyboard-background1x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/keyboard-background1x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/keyboard-background1x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/keyboard-background1x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/keyboard-background2x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/keyboard-background2x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/keyboard-background2x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/iphone-background.imageset/keyboard-background2x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/kb-dark-blue-pressed.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/kb-dark-blue-pressed.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/kb-dark-blue-pressed.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/kb-dark-blue-pressed.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/kb-dark-blue-pressed.imageset/kb-dark-blue-pressed.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/kb-dark-blue-pressed.imageset/kb-dark-blue-pressed.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/kb-dark-blue-pressed.imageset/kb-dark-blue-pressed.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/kb-dark-blue-pressed.imageset/kb-dark-blue-pressed.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/kbslide-button-highlighted.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/kbslide-button-highlighted.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/kbslide-button-highlighted.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/kbslide-button-highlighted.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/kbslide-button-highlighted.imageset/kb-slide-button-pressed.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/kbslide-button-highlighted.imageset/kb-slide-button-pressed.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/kbslide-button-highlighted.imageset/kb-slide-button-pressed.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/kbslide-button-highlighted.imageset/kb-slide-button-pressed.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/keyboard-slide11x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/keyboard-slide11x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/keyboard-slide11x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/keyboard-slide11x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/keyboard-slide12x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/keyboard-slide12x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/keyboard-slide12x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg1.imageset/keyboard-slide12x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/keyboard-slide21x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/keyboard-slide21x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/keyboard-slide21x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/keyboard-slide21x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/keyboard-slide22x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/keyboard-slide22x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/keyboard-slide22x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg2.imageset/keyboard-slide22x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/keyboard-slide31x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/keyboard-slide31x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/keyboard-slide31x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/keyboard-slide31x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/keyboard-slide32x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/keyboard-slide32x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/keyboard-slide32x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/keyboard-slide-bg3.imageset/keyboard-slide32x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/multiplication1x.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/multiplication1x.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/multiplication1x.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/multiplication1x.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/multiplication2x-ipad.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/multiplication2x-ipad.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/multiplication2x-ipad.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-ipad.imageset/multiplication2x-ipad.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/multiplication1x-iphone.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/multiplication1x-iphone.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/multiplication1x-iphone.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/multiplication1x-iphone.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/multiplication2x-iphone.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/multiplication2x-iphone.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/multiplication2x-iphone.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/multiplication-icon-iphone.imageset/multiplication2x-iphone.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/num-button-disabled.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/num-button-disabled.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/num-button-disabled.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/num-button-disabled.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/num-button-disabled.imageset/grey-button-disabled.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/num-button-disabled.imageset/grey-button-disabled.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/num-button-disabled.imageset/grey-button-disabled.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/num-button-disabled.imageset/grey-button-disabled.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/num-button-highlighted.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/num-button-highlighted.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/num-button-highlighted.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/num-button-highlighted.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/num-button-highlighted.imageset/keyboard-num-pressed.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/num-button-highlighted.imageset/keyboard-num-pressed.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/num-button-highlighted.imageset/keyboard-num-pressed.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/num-button-highlighted.imageset/keyboard-num-pressed.png diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/orange-button-highlighted.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/orange-button-highlighted.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/orange-button-highlighted.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/orange-button-highlighted.imageset/Contents.json diff --git a/MathKeyboardResources/KeyboardAssests.xcassets/orange-button-highlighted.imageset/keyboard-orange-pressed.png b/mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/orange-button-highlighted.imageset/keyboard-orange-pressed.png similarity index 100% rename from MathKeyboardResources/KeyboardAssests.xcassets/orange-button-highlighted.imageset/keyboard-orange-pressed.png rename to mathKeyboard/MathKeyboardResources/KeyboardAssests.xcassets/orange-button-highlighted.imageset/keyboard-orange-pressed.png diff --git a/MathKeyboardResources/MTKeyboard.xib b/mathKeyboard/MathKeyboardResources/MTKeyboard.xib similarity index 100% rename from MathKeyboardResources/MTKeyboard.xib rename to mathKeyboard/MathKeyboardResources/MTKeyboard.xib diff --git a/MathKeyboardResources/MTKeyboardTab2.xib b/mathKeyboard/MathKeyboardResources/MTKeyboardTab2.xib similarity index 100% rename from MathKeyboardResources/MTKeyboardTab2.xib rename to mathKeyboard/MathKeyboardResources/MTKeyboardTab2.xib diff --git a/MathKeyboardResources/MTKeyboardTab3.xib b/mathKeyboard/MathKeyboardResources/MTKeyboardTab3.xib similarity index 100% rename from MathKeyboardResources/MTKeyboardTab3.xib rename to mathKeyboard/MathKeyboardResources/MTKeyboardTab3.xib diff --git a/MathKeyboardResources/MTKeyboardTab4.xib b/mathKeyboard/MathKeyboardResources/MTKeyboardTab4.xib similarity index 100% rename from MathKeyboardResources/MTKeyboardTab4.xib rename to mathKeyboard/MathKeyboardResources/MTKeyboardTab4.xib diff --git a/MathKeyboardResources/MTMathKeyboardRootView.xib b/mathKeyboard/MathKeyboardResources/MTMathKeyboardRootView.xib similarity index 100% rename from MathKeyboardResources/MTMathKeyboardRootView.xib rename to mathKeyboard/MathKeyboardResources/MTMathKeyboardRootView.xib diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace Small.imageset/Backspace Small.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace Small.imageset/Backspace Small.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace Small.imageset/Backspace Small.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace Small.imageset/Backspace Small.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace Small.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace Small.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace Small.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace Small.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace.imageset/Backspace.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace.imageset/Backspace.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace.imageset/Backspace.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace.imageset/Backspace.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Backspace.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Exponent.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Exponent.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Exponent.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Exponent.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Exponent.imageset/Exponent.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Exponent.imageset/Exponent.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Exponent.imageset/Exponent.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Exponent.imageset/Exponent.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Fraction.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Fraction.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Fraction.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Fraction.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Fraction.imageset/Fraction.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Fraction.imageset/Fraction.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Fraction.imageset/Fraction.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Fraction.imageset/Fraction.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Keyboard.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Keyboard.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Keyboard.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Keyboard.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Keyboard.imageset/Functions Keyboard.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Keyboard.imageset/Functions Keyboard.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Keyboard.imageset/Functions Keyboard.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Keyboard.imageset/Functions Keyboard.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Symbol.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Symbol.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Symbol.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Symbol.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Symbol.imageset/Functions Symbol.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Symbol.imageset/Functions Symbol.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Symbol.imageset/Functions Symbol.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Functions Symbol.imageset/Functions Symbol.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard Down.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard Down.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard Down.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard Down.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard Down.imageset/Keyboard Down.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard Down.imageset/Keyboard Down.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard Down.imageset/Keyboard Down.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard Down.imageset/Keyboard Down.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-azure-pressed.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-azure-pressed.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-azure-pressed.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-azure-pressed.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-azure-pressed.imageset/Keyboard-azure-pressed.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-azure-pressed.imageset/Keyboard-azure-pressed.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-azure-pressed.imageset/Keyboard-azure-pressed.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-azure-pressed.imageset/Keyboard-azure-pressed.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-green-pressed.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-green-pressed.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-green-pressed.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-green-pressed.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-green-pressed.imageset/Keyboard-green-pressed.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-green-pressed.imageset/Keyboard-green-pressed.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-green-pressed.imageset/Keyboard-green-pressed.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-green-pressed.imageset/Keyboard-green-pressed.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-grey-pressed.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-grey-pressed.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-grey-pressed.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-grey-pressed.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-grey-pressed.imageset/Keyboard-grey-pressed.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-grey-pressed.imageset/Keyboard-grey-pressed.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-grey-pressed.imageset/Keyboard-grey-pressed.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-grey-pressed.imageset/Keyboard-grey-pressed.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-marine-pressed.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-marine-pressed.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-marine-pressed.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-marine-pressed.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-marine-pressed.imageset/Keyboard-marine-pressed.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-marine-pressed.imageset/Keyboard-marine-pressed.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-marine-pressed.imageset/Keyboard-marine-pressed.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-marine-pressed.imageset/Keyboard-marine-pressed.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-orange-pressed.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-orange-pressed.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-orange-pressed.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-orange-pressed.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-orange-pressed.imageset/Keyboard-orange-pressed.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-orange-pressed.imageset/Keyboard-orange-pressed.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-orange-pressed.imageset/Keyboard-orange-pressed.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Keyboard-orange-pressed.imageset/Keyboard-orange-pressed.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Letter Symbol.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Letter Symbol.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Letter Symbol.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Letter Symbol.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Letter Symbol.imageset/Letter Symbol.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Letter Symbol.imageset/Letter Symbol.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Letter Symbol.imageset/Letter Symbol.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Letter Symbol.imageset/Letter Symbol.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Letters Keyboard.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Letters Keyboard.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Letters Keyboard.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Letters Keyboard.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Letters Keyboard.imageset/Letters Keyboard.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Letters Keyboard.imageset/Letters Keyboard.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Letters Keyboard.imageset/Letters Keyboard.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Letters Keyboard.imageset/Letters Keyboard.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Log Inverted.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Log Inverted.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Log Inverted.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Log Inverted.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Log Inverted.imageset/Log Inverted.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Log Inverted.imageset/Log Inverted.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Log Inverted.imageset/Log Inverted.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Log Inverted.imageset/Log Inverted.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Log with base.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Log with base.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Log with base.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Log with base.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Log with base.imageset/Log with base.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Log with base.imageset/Log with base.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Log with base.imageset/Log with base.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Log with base.imageset/Log with base.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Number Symbol.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Number Symbol.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Number Symbol.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Number Symbol.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Number Symbol.imageset/Number Symbol.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Number Symbol.imageset/Number Symbol.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Number Symbol.imageset/Number Symbol.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Number Symbol.imageset/Number Symbol.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Numbers Keyboard.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Numbers Keyboard.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Numbers Keyboard.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Numbers Keyboard.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Numbers Keyboard.imageset/Numbers Keyboard.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Numbers Keyboard.imageset/Numbers Keyboard.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Numbers Keyboard.imageset/Numbers Keyboard.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Numbers Keyboard.imageset/Numbers Keyboard.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Keyboard.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Keyboard.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Keyboard.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Keyboard.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Keyboard.imageset/Operations Keyboard.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Keyboard.imageset/Operations Keyboard.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Keyboard.imageset/Operations Keyboard.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Keyboard.imageset/Operations Keyboard.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Symbol.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Symbol.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Symbol.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Symbol.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Symbol.imageset/Operations Symbol.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Symbol.imageset/Operations Symbol.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Symbol.imageset/Operations Symbol.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Operations Symbol.imageset/Operations Symbol.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Shift.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Shift.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Shift.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Shift.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Shift.imageset/Shift.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Shift.imageset/Shift.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Shift.imageset/Shift.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Shift.imageset/Shift.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Inverted.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Inverted.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Inverted.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Inverted.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Inverted.imageset/Sqrt White Fixed.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Inverted.imageset/Sqrt White Fixed.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Inverted.imageset/Sqrt White Fixed.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Inverted.imageset/Sqrt White Fixed.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Power Inverted.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Power Inverted.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Power Inverted.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Power Inverted.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Power Inverted.imageset/Sqrt Power Inverted.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Power Inverted.imageset/Sqrt Power Inverted.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Power Inverted.imageset/Sqrt Power Inverted.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt Power Inverted.imageset/Sqrt Power Inverted.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt with Power.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt with Power.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt with Power.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt with Power.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt with Power.imageset/Sqrt with Power.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt with Power.imageset/Sqrt with Power.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt with Power.imageset/Sqrt with Power.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt with Power.imageset/Sqrt with Power.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt.imageset/Sqrt.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt.imageset/Sqrt.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt.imageset/Sqrt.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Sqrt.imageset/Sqrt.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript Inverted.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript Inverted.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript Inverted.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript Inverted.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript Inverted.imageset/Subscript Inverted.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript Inverted.imageset/Subscript Inverted.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript Inverted.imageset/Subscript Inverted.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript Inverted.imageset/Subscript Inverted.pdf diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript.imageset/Contents.json diff --git a/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript.imageset/Subscript.pdf b/mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript.imageset/Subscript.pdf similarity index 100% rename from MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript.imageset/Subscript.pdf rename to mathKeyboard/MathKeyboardResources/NewKeyboardAssets.xcassets/Subscript.imageset/Subscript.pdf diff --git a/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Functions Symbol wbg.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Functions Symbol wbg.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Functions Symbol wbg.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Functions Symbol wbg.imageset/Contents.json diff --git a/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Functions Symbol wbg.imageset/Functions Symbol.pdf b/mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Functions Symbol wbg.imageset/Functions Symbol.pdf similarity index 100% rename from MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Functions Symbol wbg.imageset/Functions Symbol.pdf rename to mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Functions Symbol wbg.imageset/Functions Symbol.pdf diff --git a/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Letter Symbol wbg.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Letter Symbol wbg.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Letter Symbol wbg.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Letter Symbol wbg.imageset/Contents.json diff --git a/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Letter Symbol wbg.imageset/Letter Symbol.pdf b/mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Letter Symbol wbg.imageset/Letter Symbol.pdf similarity index 100% rename from MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Letter Symbol wbg.imageset/Letter Symbol.pdf rename to mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Letter Symbol wbg.imageset/Letter Symbol.pdf diff --git a/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Numbers Symbol wbg.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Numbers Symbol wbg.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Numbers Symbol wbg.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Numbers Symbol wbg.imageset/Contents.json diff --git a/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Numbers Symbol wbg.imageset/Numbers Symbol.pdf b/mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Numbers Symbol wbg.imageset/Numbers Symbol.pdf similarity index 100% rename from MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Numbers Symbol wbg.imageset/Numbers Symbol.pdf rename to mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Numbers Symbol wbg.imageset/Numbers Symbol.pdf diff --git a/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Operations Symbol wbg.imageset/Contents.json b/mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Operations Symbol wbg.imageset/Contents.json similarity index 100% rename from MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Operations Symbol wbg.imageset/Contents.json rename to mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Operations Symbol wbg.imageset/Contents.json diff --git a/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Operations Symbol wbg.imageset/Operations Symbol.pdf b/mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Operations Symbol wbg.imageset/Operations Symbol.pdf similarity index 100% rename from MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Operations Symbol wbg.imageset/Operations Symbol.pdf rename to mathKeyboard/MathKeyboardResources/WhiteBGKeyboardTab.xcassets/Operations Symbol wbg.imageset/Operations Symbol.pdf diff --git a/MathKeyboardResources/lmroman10-bolditalic.otf b/mathKeyboard/MathKeyboardResources/lmroman10-bolditalic.otf similarity index 100% rename from MathKeyboardResources/lmroman10-bolditalic.otf rename to mathKeyboard/MathKeyboardResources/lmroman10-bolditalic.otf diff --git a/mathKeyboard/include/module.modulemap b/mathKeyboard/include/module.modulemap new file mode 100644 index 0000000..c1a74ac --- /dev/null +++ b/mathKeyboard/include/module.modulemap @@ -0,0 +1,5 @@ +module MathKeyboard { + header "../keyboard/MTMathKeyboardRootView.h" + + export * +} diff --git a/mathEditor/keyboard/MTKeyboard.h b/mathKeyboard/keyboard/MTKeyboard.h similarity index 100% rename from mathEditor/keyboard/MTKeyboard.h rename to mathKeyboard/keyboard/MTKeyboard.h diff --git a/mathEditor/keyboard/MTKeyboard.m b/mathKeyboard/keyboard/MTKeyboard.m similarity index 98% rename from mathEditor/keyboard/MTKeyboard.m rename to mathKeyboard/keyboard/MTKeyboard.m index 7a4b5fa..fd0201a 100644 --- a/mathEditor/keyboard/MTKeyboard.m +++ b/mathKeyboard/keyboard/MTKeyboard.m @@ -9,7 +9,6 @@ // #import "MTKeyboard.h" -#import "MTMathKeyboardRootView.h" #import "MTFontManager.h" #import "MTMathAtomFactory.h" @@ -37,7 +36,7 @@ - (NSString*) registerAndGetFontName static dispatch_once_t once_token; dispatch_once(&once_token, ^{ - NSBundle *bundle = [MTMathKeyboardRootView getMathKeyboardResourcesBundle]; + NSBundle *bundle = SWIFTPM_MODULE_BUNDLE; NSString* fontPath = [bundle pathForResource:@"lmroman10-bolditalic" ofType:@"otf"]; CGDataProviderRef fontDataProvider = CGDataProviderCreateWithFilename([fontPath UTF8String]); CGFontRef myFont = CGFontCreateWithDataProvider(fontDataProvider); diff --git a/mathEditor/keyboard/MTMathKeyboardRootView.h b/mathKeyboard/keyboard/MTMathKeyboardRootView.h similarity index 100% rename from mathEditor/keyboard/MTMathKeyboardRootView.h rename to mathKeyboard/keyboard/MTMathKeyboardRootView.h diff --git a/mathEditor/keyboard/MTMathKeyboardRootView.m b/mathKeyboard/keyboard/MTMathKeyboardRootView.m similarity index 97% rename from mathEditor/keyboard/MTMathKeyboardRootView.m rename to mathKeyboard/keyboard/MTMathKeyboardRootView.m index 06696d0..39650f2 100644 --- a/mathEditor/keyboard/MTMathKeyboardRootView.m +++ b/mathKeyboard/keyboard/MTMathKeyboardRootView.m @@ -46,10 +46,7 @@ +(instancetype)sharedInstance { // Gets the math keyboard resources bundle +(NSBundle *)getMathKeyboardResourcesBundle { -#ifdef SWIFTPM_MODULE_BUNDLE return SWIFTPM_MODULE_BUNDLE; -#endif - return [NSBundle bundleWithURL:[[NSBundle bundleForClass:[self class]] URLForResource:@"MTKeyboardResources" withExtension:@"bundle"]]; } -(void)awakeFromNib From 3fadb236f7ba5b4de2a6f3d818dcf8661506b298 Mon Sep 17 00:00:00 2001 From: Madiyar Aitbayev Date: Mon, 21 Jul 2025 00:44:42 +0100 Subject: [PATCH 8/9] Support MacOS as no-op --- Package.swift | 7 +++++-- mathEditor/editor/MTEditableMathLabel.h | 4 ++++ mathEditor/editor/MTEditableMathLabel.m | 4 ++++ mathEditor/internal/MTCaretView.h | 6 +++--- mathEditor/internal/MTCaretView.m | 6 +++++- mathEditor/internal/MTDisplay+Editing.h | 3 +++ mathEditor/internal/MTDisplay+Editing.m | 4 ++++ 7 files changed, 28 insertions(+), 6 deletions(-) diff --git a/Package.swift b/Package.swift index 860e8a3..bba9576 100644 --- a/Package.swift +++ b/Package.swift @@ -5,11 +5,14 @@ import PackageDescription let package = Package( name: "MathEditor", defaultLocalization: "en", - platforms: [.iOS(.v13)], + platforms: [.iOS(.v13), .macOS(.v11)], products: [ .library( name: "MathEditor", - targets: ["MathEditor", "MathKeyboard"]) + targets: ["MathEditor"]), + .library( + name: "MathKeyboard", + targets: ["MathKeyboard"]) ], dependencies: [ .package(url: "https://github.com/maitbayev/iosMath.git", branch: "master") diff --git a/mathEditor/editor/MTEditableMathLabel.h b/mathEditor/editor/MTEditableMathLabel.h index cf39bbd..796e419 100644 --- a/mathEditor/editor/MTEditableMathLabel.h +++ b/mathEditor/editor/MTEditableMathLabel.h @@ -8,6 +8,8 @@ // MIT license. See the LICENSE file for details. // +#if TARGET_OS_IPHONE + #import #include "MTMathList.h" @@ -89,3 +91,5 @@ - (CGSize) mathDisplaySize; @end + +#endif diff --git a/mathEditor/editor/MTEditableMathLabel.m b/mathEditor/editor/MTEditableMathLabel.m index 0d732f2..48d30d2 100644 --- a/mathEditor/editor/MTEditableMathLabel.m +++ b/mathEditor/editor/MTEditableMathLabel.m @@ -8,6 +8,8 @@ // MIT license. See the LICENSE file for details. // +#if TARGET_OS_IPHONE + #import #import "MTEditableMathLabel.h" @@ -1043,3 +1045,5 @@ - (UITextRange *)textRangeFromPosition:(UITextPosition *)fromPosition toPosition } @end + +#endif diff --git a/mathEditor/internal/MTCaretView.h b/mathEditor/internal/MTCaretView.h index 1c6bab8..09beae2 100644 --- a/mathEditor/internal/MTCaretView.h +++ b/mathEditor/internal/MTCaretView.h @@ -8,13 +8,13 @@ // MIT license. See the LICENSE file for details. // -#import +#import "MTConfig.h" @class MTEditableMathLabel; -@interface MTCaretView : UIView +@interface MTCaretView : MTView -@property (nonatomic) UIColor* caretColor; +@property (nonatomic) MTColor* caretColor; - (id) initWithEditor:(MTEditableMathLabel*)label; diff --git a/mathEditor/internal/MTCaretView.m b/mathEditor/internal/MTCaretView.m index 04e9f89..a03b4ca 100644 --- a/mathEditor/internal/MTCaretView.m +++ b/mathEditor/internal/MTCaretView.m @@ -8,8 +8,11 @@ // MIT license. See the LICENSE file for details. // +#if TARGET_OS_IPHONE + #import "MTCaretView.h" #import "MTEditableMathLabel.h" +#import "MTConfig.h" static const NSTimeInterval InitialBlinkDelay = 0.7; static const NSTimeInterval BlinkRate = 0.5; @@ -27,7 +30,7 @@ static NSInteger getCaretHeight() { return kCaretAscent + kCaretDescent; } -@interface MTCaretHandle : UIView +@interface MTCaretHandle : MTView @property (nonatomic, weak) MTEditableMathLabel* label; @@ -220,3 +223,4 @@ - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event{ @end +#endif diff --git a/mathEditor/internal/MTDisplay+Editing.h b/mathEditor/internal/MTDisplay+Editing.h index 437232a..1d0ccde 100644 --- a/mathEditor/internal/MTDisplay+Editing.h +++ b/mathEditor/internal/MTDisplay+Editing.h @@ -8,6 +8,8 @@ // MIT license. See the LICENSE file for details. // +#if TARGET_OS_IPHONE + #import "MTMathListDisplay.h" #import "MTMathListIndex.h" @@ -27,3 +29,4 @@ @end +#endif diff --git a/mathEditor/internal/MTDisplay+Editing.m b/mathEditor/internal/MTDisplay+Editing.m index bc719e4..ec9d72b 100644 --- a/mathEditor/internal/MTDisplay+Editing.m +++ b/mathEditor/internal/MTDisplay+Editing.m @@ -8,6 +8,8 @@ // MIT license. See the LICENSE file for details. // +#if TARGET_OS_IPHONE + #import #import "MTDisplay+Editing.h" @@ -594,3 +596,5 @@ - (void)highlightWithColor:(UIColor *)color } @end + +#endif From 550b9056aea094c5cf67db0472ae1718c30dff0d Mon Sep 17 00:00:00 2001 From: Madiyar Aitbayev Date: Mon, 21 Jul 2025 10:48:04 +0100 Subject: [PATCH 9/9] MTDisplay+Editing on MacOS --- mathEditor/internal/MTDisplay+Editing.h | 7 ++--- mathEditor/internal/MTDisplay+Editing.m | 40 +++++++++++-------------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/mathEditor/internal/MTDisplay+Editing.h b/mathEditor/internal/MTDisplay+Editing.h index 1d0ccde..7af2631 100644 --- a/mathEditor/internal/MTDisplay+Editing.h +++ b/mathEditor/internal/MTDisplay+Editing.h @@ -8,8 +8,6 @@ // MIT license. See the LICENSE file for details. // -#if TARGET_OS_IPHONE - #import "MTMathListDisplay.h" #import "MTMathListIndex.h" @@ -22,11 +20,10 @@ - (CGPoint) caretPositionForIndex:(MTMathListIndex*) index; // Highlight the character(s) at the given index. -- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(UIColor*) color; +- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(MTColor*) color; // Highlight the entire display with the given color -- (void) highlightWithColor:(UIColor*) color; +- (void) highlightWithColor:(MTColor*) color; @end -#endif diff --git a/mathEditor/internal/MTDisplay+Editing.m b/mathEditor/internal/MTDisplay+Editing.m index ec9d72b..a60ef5b 100644 --- a/mathEditor/internal/MTDisplay+Editing.m +++ b/mathEditor/internal/MTDisplay+Editing.m @@ -8,8 +8,6 @@ // MIT license. See the LICENSE file for details. // -#if TARGET_OS_IPHONE - #import #import "MTDisplay+Editing.h" @@ -95,11 +93,11 @@ - (CGPoint)caretPositionForIndex:(MTMathListIndex *)index return kInvalidPosition; } -- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(UIColor*) color +- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(MTColor*) color { } -- (void)highlightWithColor:(UIColor *)color +- (void)highlightWithColor:(MTColor *)color { } @end @@ -115,9 +113,9 @@ - (MTMathListIndex*) closestIndexToPoint:(CGPoint) point; - (CGPoint) caretPositionForIndex:(MTMathListIndex*) index; // Highlight the character(s) at the given index. -- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(UIColor*) color; +- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(MTColor*) color; -- (void)highlightWithColor:(UIColor *)color; +- (void)highlightWithColor:(MTColor *)color; @end @@ -158,7 +156,7 @@ - (CGPoint)caretPositionForIndex:(MTMathListIndex *)index } -- (void)highlightCharacterAtIndex:(MTMathListIndex *)index color:(UIColor *)color +- (void)highlightCharacterAtIndex:(MTMathListIndex *)index color:(MTColor *)color { assert(NSLocationInRange(index.atomIndex, self.range)); assert(index.subIndexType == kMTSubIndexTypeNone || index.subIndexType == kMTSubIndexTypeNucleus); @@ -175,7 +173,7 @@ - (void)highlightCharacterAtIndex:(MTMathListIndex *)index color:(UIColor *)colo self.attributedString = attrStr; } -- (void)highlightWithColor:(UIColor *)color +- (void)highlightWithColor:(MTColor *)color { NSMutableAttributedString* attrStr = self.attributedString.mutableCopy; [attrStr addAttribute:(NSString*)kCTForegroundColorAttributeName value:(id)[color CGColor] @@ -224,9 +222,9 @@ - (MTMathListIndex*) closestIndexToPoint:(CGPoint) point; - (CGPoint) caretPositionForIndex:(MTMathListIndex*) index; // Highlight the character(s) at the given index. -- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(UIColor*) color; +- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(MTColor*) color; -- (void)highlightWithColor:(UIColor *)color; +- (void)highlightWithColor:(MTColor *)color; - (MTMathListDisplay*) subAtomForIndexType:(MTMathListSubIndexType) type; @@ -263,13 +261,13 @@ - (CGPoint)caretPositionForIndex:(MTMathListIndex *)index return CGPointMake(self.position.x, self.position.y); } -- (void)highlightCharacterAtIndex:(MTMathListIndex *)index color:(UIColor *)color +- (void)highlightCharacterAtIndex:(MTMathListIndex *)index color:(MTColor *)color { assert(index.subIndexType == kMTSubIndexTypeNone); [self highlightWithColor:color]; } -- (void)highlightWithColor:(UIColor *)color +- (void)highlightWithColor:(MTColor *)color { [self.numerator highlightWithColor:color]; [self.denominator highlightWithColor:color]; @@ -308,9 +306,9 @@ - (MTMathListIndex*) closestIndexToPoint:(CGPoint) point; - (CGPoint) caretPositionForIndex:(MTMathListIndex*) index; // Highlight the character(s) at the given index. -- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(UIColor*) color; +- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(MTColor*) color; -- (void)highlightWithColor:(UIColor *)color; +- (void)highlightWithColor:(MTColor *)color; - (MTMathListDisplay*) subAtomForIndexType:(MTMathListSubIndexType) type; @@ -350,13 +348,13 @@ - (CGPoint)caretPositionForIndex:(MTMathListIndex *)index return CGPointMake(self.position.x, self.position.y); } -- (void)highlightCharacterAtIndex:(MTMathListIndex *)index color:(UIColor *)color +- (void)highlightCharacterAtIndex:(MTMathListIndex *)index color:(MTColor *)color { assert(index.subIndexType == kMTSubIndexTypeNone); [self highlightWithColor:color]; } -- (void)highlightWithColor:(UIColor *)color +- (void)highlightWithColor:(MTColor *)color { [self.radicand highlightWithColor:color]; } @@ -395,9 +393,9 @@ - (MTMathListIndex*) closestIndexToPoint:(CGPoint) point; - (CGPoint) caretPositionForIndex:(MTMathListIndex*) index; // Highlight the character(s) at the given index. -- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(UIColor*) color; +- (void) highlightCharacterAtIndex:(MTMathListIndex*) index color:(MTColor*) color; -- (void)highlightWithColor:(UIColor *)color; +- (void)highlightWithColor:(MTColor *)color; @end @@ -572,7 +570,7 @@ - (CGPoint)caretPositionForIndex:(MTMathListIndex *)index } -- (void)highlightCharacterAtIndex:(MTMathListIndex *)index color:(UIColor *)color +- (void)highlightCharacterAtIndex:(MTMathListIndex *)index color:(MTColor *)color { if (!index) { return; @@ -588,7 +586,7 @@ - (void)highlightCharacterAtIndex:(MTMathListIndex *)index color:(UIColor *)colo } } -- (void)highlightWithColor:(UIColor *)color +- (void)highlightWithColor:(MTColor *)color { for (MTDisplay* atom in self.subDisplays) { [atom highlightWithColor:color]; @@ -596,5 +594,3 @@ - (void)highlightWithColor:(UIColor *)color } @end - -#endif