Versions
:sparkle:Helping you find inner peace when comparing version numbers in Swift.
Install / Use
/learn @zenangst/VersionsREADME

Helping you find inner peace when comparing version numbers in Swift.
Comparing with the current applications version couldn't be easier.
// App.version is 1.0.0
if App.version.olderThan("2.0.0") {
// Prompt user to update
}
But you can apply this to more things than just the CFBundleShortVersionString.
let currentVersion = "1.0.1a"
if currentVersion.olderThan("1.1.3") {
// update
}
Versions also support semantic versioning (Major, Minor, Patch)
if "1.0".semanticCompare("2.0") == Semantic.Major) {
// major update
}
CocoaPod
Verisons is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Versions"
Contribute
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create pull request
Who made this?
- Christoffer Winterkvist (@zenangst)
- Kostiantyn Koval (@KostiaKoval)
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
