From 4dfaf028bb1d3a3c926cf2fe292c13d8e2ea7b1d Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 2 Oct 2025 11:21:44 -0600 Subject: [PATCH] Refactor project structure to support Swift Package Manager - Updated directory structure from `Classes` to `Sources/BEMCheckBox` for compatibility with Swift Package Manager. - Modified paths in `Package.swift` to reflect new source directory. - Updated references in `project.pbxproj` to point to the new source files location. --- CLAUDE.md | 15 ++++++++------- Package.swift | 1 - Sample Project/CheckBox.xcodeproj/project.pbxproj | 8 ++++---- .../BEMCheckBox}/BEMAnimationManager.swift | 0 .../BEMCheckBox}/BEMCheckBox.swift | 0 .../BEMCheckBox}/BEMCheckBoxGroup.swift | 0 .../BEMCheckBox}/BEMPathManager.swift | 0 7 files changed, 12 insertions(+), 12 deletions(-) rename {Classes => Sources/BEMCheckBox}/BEMAnimationManager.swift (100%) rename {Classes => Sources/BEMCheckBox}/BEMCheckBox.swift (100%) rename {Classes => Sources/BEMCheckBox}/BEMCheckBoxGroup.swift (100%) rename {Classes => Sources/BEMCheckBox}/BEMPathManager.swift (100%) diff --git a/CLAUDE.md b/CLAUDE.md index dc2ba95..9745163 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,11 +14,12 @@ BEMCheckBox is an open-source iOS checkbox library that provides beautiful, high ``` BEMCheckBox/ -├── Classes/ # Swift source files for the main library -│ ├── BEMCheckBox.swift # Main checkbox implementation -│ ├── BEMCheckBoxGroup.swift # Radio button group functionality -│ ├── BEMAnimationManager.swift # Animation handling -│ └── BEMPathManager.swift # Path drawing utilities +├── Sources/ # Swift Package Manager source directory +│ └── BEMCheckBox/ # Swift source files for the main library +│ ├── BEMCheckBox.swift # Main checkbox implementation +│ ├── BEMCheckBoxGroup.swift # Radio button group functionality +│ ├── BEMAnimationManager.swift # Animation handling +│ └── BEMPathManager.swift # Path drawing utilities ├── Sample Project/ # Example iOS application (Objective-C) │ ├── CheckBox.xcodeproj/ # Xcode project file │ ├── CheckBox/ # Example app source code @@ -246,7 +247,7 @@ Note: The latest CocoaPods version is v1.4.1 from the original repository Add to Cartfile and run `carthage update` ### Manual -Copy the `Classes` folder directly into your Xcode project +Copy the `Sources/BEMCheckBox` folder directly into your Xcode project ## Development Setup @@ -305,7 +306,7 @@ xcodebuild clean -project "Sample Project/CheckBox.xcodeproj" -scheme BEMCheckBo ### Generate Documentation ```bash # If using jazzy for documentation -jazzy --module BEMCheckBox --source-directory Classes/ +jazzy --module BEMCheckBox --source-directory Sources/BEMCheckBox/ ``` ### Check Swift Version diff --git a/Package.swift b/Package.swift index a853113..b13336f 100644 --- a/Package.swift +++ b/Package.swift @@ -13,7 +13,6 @@ let package = Package( .target( name: "BEMCheckBox", dependencies: [], - path: "Classes", swiftSettings: [ .swiftLanguageMode(.v5) ] diff --git a/Sample Project/CheckBox.xcodeproj/project.pbxproj b/Sample Project/CheckBox.xcodeproj/project.pbxproj index 6133eec..b28d9bc 100644 --- a/Sample Project/CheckBox.xcodeproj/project.pbxproj +++ b/Sample Project/CheckBox.xcodeproj/project.pbxproj @@ -69,10 +69,10 @@ 5643F12B1CDE722C0020E238 /* BEMCheckBox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BEMCheckBox.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5643F12D1CDE722C0020E238 /* CheckBox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CheckBox.h; sourceTree = ""; }; 5643F12F1CDE722C0020E238 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5B677ED123F2B168007FBFC2 /* BEMPathManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BEMPathManager.swift; path = ../Classes/BEMPathManager.swift; sourceTree = ""; }; - 5B677ED223F2B168007FBFC2 /* BEMCheckBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BEMCheckBox.swift; path = ../Classes/BEMCheckBox.swift; sourceTree = ""; }; - 5B677ED323F2B168007FBFC2 /* BEMAnimationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BEMAnimationManager.swift; path = ../Classes/BEMAnimationManager.swift; sourceTree = ""; }; - 5B677ED423F2B168007FBFC2 /* BEMCheckBoxGroup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BEMCheckBoxGroup.swift; path = ../Classes/BEMCheckBoxGroup.swift; sourceTree = ""; }; + 5B677ED123F2B168007FBFC2 /* BEMPathManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BEMPathManager.swift; path = ../Sources/BEMCheckBox/BEMPathManager.swift; sourceTree = ""; }; + 5B677ED223F2B168007FBFC2 /* BEMCheckBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BEMCheckBox.swift; path = ../Sources/BEMCheckBox/BEMCheckBox.swift; sourceTree = ""; }; + 5B677ED323F2B168007FBFC2 /* BEMAnimationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BEMAnimationManager.swift; path = ../Sources/BEMCheckBox/BEMAnimationManager.swift; sourceTree = ""; }; + 5B677ED423F2B168007FBFC2 /* BEMCheckBoxGroup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BEMCheckBoxGroup.swift; path = ../Sources/BEMCheckBox/BEMCheckBoxGroup.swift; sourceTree = ""; }; C325370D1B9231780059F394 /* CheckBox.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CheckBox.app; sourceTree = BUILT_PRODUCTS_DIR; }; C32537111B9231780059F394 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C32537121B9231780059F394 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; diff --git a/Classes/BEMAnimationManager.swift b/Sources/BEMCheckBox/BEMAnimationManager.swift similarity index 100% rename from Classes/BEMAnimationManager.swift rename to Sources/BEMCheckBox/BEMAnimationManager.swift diff --git a/Classes/BEMCheckBox.swift b/Sources/BEMCheckBox/BEMCheckBox.swift similarity index 100% rename from Classes/BEMCheckBox.swift rename to Sources/BEMCheckBox/BEMCheckBox.swift diff --git a/Classes/BEMCheckBoxGroup.swift b/Sources/BEMCheckBox/BEMCheckBoxGroup.swift similarity index 100% rename from Classes/BEMCheckBoxGroup.swift rename to Sources/BEMCheckBox/BEMCheckBoxGroup.swift diff --git a/Classes/BEMPathManager.swift b/Sources/BEMCheckBox/BEMPathManager.swift similarity index 100% rename from Classes/BEMPathManager.swift rename to Sources/BEMCheckBox/BEMPathManager.swift