A Swift library for representing and comparing semantic version numbers following SemVer 2.0.0.
Version is a Swift library that enables developers to represent and compare semantic version numbers following the SemVer 2.0.0 specification. It solves the problem of handling version strings in a type-safe and reliable way, allowing for easy comparison of OS versions, framework versions, and dependency requirements.
Swift developers building iOS, macOS, or other Apple platform applications who need to manage version checks for compatibility, dependencies, or conditional feature toggling.
Developers choose Version for its strict SemVer compliance, seamless integration with Swift's type system, and convenience methods for checking OS and bundle versions, reducing the risk of errors in version comparisons.
Represent and compare versions via semantic versioning (SemVer) in Swift
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements Semantic Versioning 2.0.0 exactly, ensuring accurate version representation and comparison, as highlighted in the README's focus on adherence.
Conforms to key Swift protocols like Comparable, Hashable, and String Literal Convertible, making it a natural part of the Swift type system for easy adoption.
Provides direct methods to compare against system versions via ProcessInfo and extract versions from bundles, simplifying conditional logic for iOS/macOS development.
Supports creation from integers or parsing from strings, including string literals for concise syntax, as shown in usage examples.
Runtime version checks, especially for bundle versions, can hurt performance if used inappropriately, a limitation explicitly warned in the README.
Exclusively for Swift projects, making it unsuitable for mixed-language or non-Apple development environments, limiting cross-platform utility.
Does not natively support SemVer-style version ranges (e.g., caret or tilde ranges), requiring additional logic for common dependency management scenarios.