diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/Echo.xcodeproj/project.pbxproj b/Echo.xcodeproj/project.pbxproj
index ccef017..7b8ebab 100644
--- a/Echo.xcodeproj/project.pbxproj
+++ b/Echo.xcodeproj/project.pbxproj
@@ -141,7 +141,8 @@
2DB496B01B5D37470012D92A /* extensions */,
2DBC9BFC1B558FBD00F15967 /* Supporting Files */,
);
- path = Echo;
+ name = Echo;
+ path = Sources/Echo;
sourceTree = "";
};
2DBC9BFC1B558FBD00F15967 /* Supporting Files */ = {
@@ -264,6 +265,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
Base,
);
@@ -451,7 +453,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
- INFOPLIST_FILE = Echo/Info.plist;
+ INFOPLIST_FILE = Sources/Echo/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -472,7 +474,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
- INFOPLIST_FILE = Echo/Info.plist;
+ INFOPLIST_FILE = Sources/Echo/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
diff --git a/Package.swift b/Package.swift
new file mode 100644
index 0000000..079ad64
--- /dev/null
+++ b/Package.swift
@@ -0,0 +1,27 @@
+// swift-tools-version: 5.7
+// The swift-tools-version declares the minimum version of Swift required to build this package.
+
+import PackageDescription
+
+let package = Package(
+ name: "Echo",
+ products: [
+ // Products define the executables and libraries a package produces, and make them visible to other packages.
+ .library(
+ name: "Echo",
+ targets: ["Echo"]),
+ ],
+ dependencies: [
+ // Dependencies declare other packages that this package depends on.
+ // .package(url: /* package url */, from: "1.0.0"),
+ ],
+ targets: [
+ // Targets are the basic building blocks of a package. A target can define a module or a test suite.
+ // Targets can depend on other targets in this package, and on products in packages this package depends on.
+ .target(
+ name: "Echo",
+ dependencies: [],
+ exclude: ["Echo.h", "Info.plist"]
+ ),
+ ]
+)
diff --git a/Echo/Echo.h b/Sources/Echo/Echo.h
similarity index 100%
rename from Echo/Echo.h
rename to Sources/Echo/Echo.h
diff --git a/Echo/Info.plist b/Sources/Echo/Info.plist
similarity index 100%
rename from Echo/Info.plist
rename to Sources/Echo/Info.plist
diff --git a/Echo/controllers/input_accessory_controller.swift b/Sources/Echo/controllers/input_accessory_controller.swift
similarity index 99%
rename from Echo/controllers/input_accessory_controller.swift
rename to Sources/Echo/controllers/input_accessory_controller.swift
index 610dcbf..48ba742 100644
--- a/Echo/controllers/input_accessory_controller.swift
+++ b/Sources/Echo/controllers/input_accessory_controller.swift
@@ -1,6 +1,6 @@
import UIKit
-public protocol InputAccessoryControllerDelegate: class {
+public protocol InputAccessoryControllerDelegate: AnyObject {
/// Called whenever the keyboard frame changes
///
diff --git a/Echo/controllers/keyboard_layout_guide.swift b/Sources/Echo/controllers/keyboard_layout_guide.swift
similarity index 98%
rename from Echo/controllers/keyboard_layout_guide.swift
rename to Sources/Echo/controllers/keyboard_layout_guide.swift
index 65aaa17..0e02ff2 100644
--- a/Echo/controllers/keyboard_layout_guide.swift
+++ b/Sources/Echo/controllers/keyboard_layout_guide.swift
@@ -1,3 +1,5 @@
+import UIKit
+
open class KeyboardLayoutGuide: UILayoutGuide {
lazy var heightConstraint: NSLayoutConstraint = {
diff --git a/Echo/data_structures/animation.swift b/Sources/Echo/data_structures/animation.swift
similarity index 100%
rename from Echo/data_structures/animation.swift
rename to Sources/Echo/data_structures/animation.swift
diff --git a/Echo/data_structures/input_accessory_controller_behaviours.swift b/Sources/Echo/data_structures/input_accessory_controller_behaviours.swift
similarity index 90%
rename from Echo/data_structures/input_accessory_controller_behaviours.swift
rename to Sources/Echo/data_structures/input_accessory_controller_behaviours.swift
index ac1a694..69f2ce2 100644
--- a/Echo/data_structures/input_accessory_controller_behaviours.swift
+++ b/Sources/Echo/data_structures/input_accessory_controller_behaviours.swift
@@ -20,6 +20,6 @@ public struct InputAccessoryControllerBehaviours: OptionSet {
self.rawValue = rawValue
}
- public static let allZeros = InputAccessoryControllerBehaviours(rawValue: 0)
+ public static let allZeros = InputAccessoryControllerBehaviours([])
public static let adjustContentOffset = InputAccessoryControllerBehaviours(rawValue: 0b1)
}
diff --git a/Echo/data_structures/keyboard_change.swift b/Sources/Echo/data_structures/keyboard_change.swift
similarity index 100%
rename from Echo/data_structures/keyboard_change.swift
rename to Sources/Echo/data_structures/keyboard_change.swift
diff --git a/Echo/data_structures/keyboard_change_type.swift b/Sources/Echo/data_structures/keyboard_change_type.swift
similarity index 100%
rename from Echo/data_structures/keyboard_change_type.swift
rename to Sources/Echo/data_structures/keyboard_change_type.swift
diff --git a/Echo/extensions/ui_responder_echo.swift b/Sources/Echo/extensions/ui_responder_echo.swift
similarity index 97%
rename from Echo/extensions/ui_responder_echo.swift
rename to Sources/Echo/extensions/ui_responder_echo.swift
index 7a75f6f..6f98a51 100644
--- a/Echo/extensions/ui_responder_echo.swift
+++ b/Sources/Echo/extensions/ui_responder_echo.swift
@@ -1,4 +1,5 @@
import Foundation
+import UIKit
var DidNotResignFirstResponder = "didNotResignFirstResponder"
diff --git a/Echo/extensions/ui_scroll_view_echo.swift b/Sources/Echo/extensions/ui_scroll_view_echo.swift
similarity index 100%
rename from Echo/extensions/ui_scroll_view_echo.swift
rename to Sources/Echo/extensions/ui_scroll_view_echo.swift
diff --git a/Tests/echoTests/echoTests.swift b/Tests/echoTests/echoTests.swift
new file mode 100644
index 0000000..8200cb5
--- /dev/null
+++ b/Tests/echoTests/echoTests.swift
@@ -0,0 +1,11 @@
+import XCTest
+@testable import echo
+
+final class echoTests: XCTestCase {
+ func testExample() throws {
+ // This is an example of a functional test case.
+ // Use XCTAssert and related functions to verify your tests produce the correct
+ // results.
+ XCTAssertEqual(echo().text, "Hello, World!")
+ }
+}