Semantic version model for Swift Package Manager
Targets iOS/iPadOS/tvOS 13, as well as watchOS 6 and macOS 10.15 Catalina. Written in Swift 5.3 and requires Xcode 12 or newer to build.
import Foundation
import Version
if Bundle.main.version > Version(string: "2.0") {
print(Bundle.main.version.description) // "2.1"
print(Bundle.main.version.description(verbose: true)) // "2.1.0"
}