Support Swift Package Manager - #54
Open
harumidiv wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds Swift Package Manager support, so the library can be consumed via SwiftPM
alongside the existing CocoaPods and Carthage integrations.
Changes
Package.swift— declares a singleGradientCircularProgresslibrary targetthat builds the existing
sourcedirectory throughpath:. No files were movedor renamed, so CocoaPods (
source_files = "source/**/*"), Carthage, and the sampleXcode project all keep working exactly as before. The Objective-C umbrella header
is excluded, as a SwiftPM Swift target does not use one.
import UIKitadded toProgress/Property.swiftandProgress/Elements/Background.swift— these were the only two files without anexplicit import. In the framework target they resolved
CGFloat,UIColor, andUIVisualEffectViewthrough the umbrella header (GradientCircularProgress.h);SwiftPM has no umbrella header, so the build failed with
cannot find type 'CGFloat' in scope. The same change is mirrored intoGCProgressSample/GradientCircularProgress/to keep the two copies of the sourcesin sync.
README.md— SwiftPM installation instructions..gitignore— SwiftPM build artifacts (.build/,.swiftpm/,Package.resolved).Verification
xcodebuild -scheme GradientCircularProgress -destination 'generic/platform=iOS Simulator'→ BUILD SUCCEEDED, with no warnings (Xcode 26.3).
via SwiftPM. Both the app and its test target build, and all 1,406 library symbols
link into the app binary with zero undefined symbols.
Note on releasing
SwiftPM resolves versions by tag, so a new tag (e.g.
3.14.0) would need to be pushedafter merging before anyone can actually depend on this. The README documents
from: "3.14.0"on that assumption — happy to change it to whatever version numberyou'd prefer.