{"id":19233689,"url":"https://github.com/brightdigit/swiftver","last_synced_at":"2026-03-07T21:32:26.907Z","repository":{"id":62456795,"uuid":"46878930","full_name":"brightdigit/SwiftVer","owner":"brightdigit","description":"Easily Manage Versioning in MacOS, iOS, watchOS, and tvOS projects.","archived":false,"fork":false,"pushed_at":"2020-02-29T18:49:47.000Z","size":1691,"stargazers_count":23,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-06T03:47:58.511Z","etag":null,"topics":["carthage","cocoapods","ios","macos","plist","swift","tvos","watchos","xcode"],"latest_commit_sha":null,"homepage":"www.swiftver.com","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brightdigit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-25T18:20:12.000Z","updated_at":"2022-02-15T09:49:06.000Z","dependencies_parsed_at":"2022-11-01T23:46:43.811Z","dependency_job_id":null,"html_url":"https://github.com/brightdigit/SwiftVer","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/brightdigit/SwiftVer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightdigit%2FSwiftVer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightdigit%2FSwiftVer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightdigit%2FSwiftVer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightdigit%2FSwiftVer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightdigit","download_url":"https://codeload.github.com/brightdigit/SwiftVer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightdigit%2FSwiftVer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279368996,"owners_count":26156864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carthage","cocoapods","ios","macos","plist","swift","tvos","watchos","xcode"],"created_at":"2024-11-09T16:11:31.783Z","updated_at":"2025-10-17T15:32:15.800Z","avatar_url":"https://github.com/brightdigit.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![header](https://raw.githubusercontent.com/brightdigit/swiftver/master/Assets/Images/Logo.png)\n\n# SwiftVer\n\n[![SwiftPM](https://img.shields.io/badge/SPM-Linux%20%7C%20iOS%20%7C%20macOS%20%7C%20watchOS%20%7C%20tvOS-success?logo=swift)](https://swift.org)\n[![Twitter](https://img.shields.io/badge/Twitter-@BrightDigit-blue.svg?style=flat)](http://twitter.com/brightdigit)\n![GitHub](https://img.shields.io/github/license/brightdigit/SwiftVer)\n![GitHub issues](https://img.shields.io/github/issues/brightdigit/SwiftVer)\n[![Beerpay](https://img.shields.io/beerpay/brightdigit/SwiftVer.svg?maxAge=2592000)](https://beerpay.io/brightdigit/SwiftVer)\n[![Analytics](https://ga-beacon.appspot.com/UA-33667276-5/brightdigit/swiftver?flat\u0026useReferer)](https://github.com/igrigorik/ga-beacon)\n\n![macOS](https://github.com/brightdigit/SwiftVer/workflows/macOS/badge.svg)\n![ubuntu](https://github.com/brightdigit/SwiftVer/workflows/ubuntu/badge.svg)\n![Travis (.com)](https://img.shields.io/travis/com/brightdigit/SwiftVer?logo=travis)\n[![Codecov](https://img.shields.io/codecov/c/github/brightdigit/swiftver.svg)](https://codecov.io/gh/brightdigit/swiftver)\n![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/BrightDigit/swiftver?label=codefactor)\n[![codebeat badge](https://codebeat.co/badges/f8cf9120-d08a-4e13-b4cb-198e0dfd02e3)](https://codebeat.co/projects/github-com-brightdigit-swiftver-master)\n![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/brightdigit/SwiftVer)\n![Code Climate technical debt](https://img.shields.io/codeclimate/tech-debt/brightdigit/SwiftVer?label=debt)\n![Code Climate issues](https://img.shields.io/codeclimate/issues/brightdigit/SwiftVer)\n\n[![Version](https://img.shields.io/cocoapods/v/SwiftVer.svg?style=flat)](https://cocoapods.org/pods/SwiftVer)\n[![License](https://img.shields.io/cocoapods/l/SwiftVer.svg?style=flat\u0026label=CocoaPods)](https://cocoapods.org/pods/SwiftVer)\n[![Platform](https://img.shields.io/cocoapods/p/SwiftVer.svg?style=flat\u0026label=CocoaPods)](https://cocoapods.org/pods/SwiftVer)\n[![Cocoapods doc percentage](https://img.shields.io/cocoapods/metrics/doc-percent/SwiftVer)](https://cocoapods.org/pods/SwiftVer)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)\n\nManage versioning in MacOS, iOS, watchOS, and tvOS projects by parsing your bundle and revision metadata from your VCS repository.\n\n![screenshoot](https://raw.githubusercontent.com/brightdigit/swiftver/master/Assets/Images/sample-image.png)\n\n## Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n  - [CocoaPods](#cocoapods)\n  - [Carthage](#carthage)\n- [Usage](#usage)\n  - [Parsing the Version from a Bundle](#parsing-the-version-from-a-bundle)\n  - [Integrating Version Control Info with Autorevision](#integrating-version-control-info-with-autorevision)\n  - [Using a StageBuildDictionary to parse Stage](#using-a-stagebuilddictionary-to-parse-stage)\n- [Documentation](/docs/README.md)\n- [Author](#author)\n- [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Requirements\n\n- XCode 8.0\n- macOS 10.10+, iOS 8.1+, watchOS 2.0+\n\n## Installation\n\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\nTo integrate SwiftVer into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nuse_frameworks!\n\npod 'SwiftVer'\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate SwiftVer into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"brightdigit/SwiftVer\" ~\u003e 2.0.0\n```\n\nRun `carthage update` to build the framework and drag the built `SwiftVer.framework` into your Xcode project.\n\n\n## Usage\n\n### Parsing the Version from a Bundle\n\nThe `Version` bundle initializer takes in a bundle and failable. If your Bundle does to contain a valid version string in the format of `major.minor` or `major.minor.patch`, the initializer will fail.\n\n```swift\nguard let version = Version(bundle: Bundle.main) else {\n\t// invalid version format\n}\n\n```\n\n#### Valid\n![xcode screenshot version 1.0.1](https://raw.githubusercontent.com/brightdigit/swiftver/master/Assets/Images/version_format_xcode_1.0.1.png)\n\n#### Valid\n![xcode screenshot version 1.0](https://raw.githubusercontent.com/brightdigit/swiftver/master/Assets/Images/version_format_xcode_1.0.png)\n\n#### Invalid\n![xcode screenshot version 1](https://raw.githubusercontent.com/brightdigit/swiftver/master/Assets/Images/version_format_xcode_1.png)\n\n### Integrating Version Control Info with [Autorevision](https://autorevision.github.io)\n\nYou can revision metadata from your VCS repository using [Autorevision](https://autorevision.github.io).\n\n1. Add the bash script from [Autorevision](https://autorevision.github.io).\n\n2. Add a Run Script build phase to your project.\n\n``` base\n\"${SRCROOT}/autorevision.sh\" -t \u003cformat\u003e \u003e${SRCROOT}/framework/autorevision.\u003cformat\u003e\n```\n\n3. Include the output in your bundle.\n\n4. Parse the output and call the `VersionControlInfo` initializer.\n\n``` swift\npublic struct VersionControlInfo {  \n\tpublic init(type: String,\n              baseName: String,\n              uuid: Hash?,\n              number: Int,\n              date: String,\n              branch: String,\n              tag: String?,\n              tick: Int?,\n              extra: String?,\n              hash: String,\n\n              isWorkingCopyModified: Bool)\n}\n```\n\n### Using a StageBuildDictionary to parse Stage\n\nIn version 2.0.0, you can parse the stage based on a StageBuildDictionary. The StageBuildDictionary is a plist which maps the Semantic Versions to Stages and their minimum build number.\n\n#### Plist where the Build Number Resets at Each Semantic Version (iOS)\n![intra build stage dictionary plist screenshot ](/Assets/Images/stagebuilddictionary-intra.png)\n\n#### Plist where the Build Number does not Reset at Each Semantic Version (Sparkle-compatible macOS)\n![global build stage dictionary plist screenshot ](/Assets/Images/stagebuilddictionary-global.png)\n\nTo create the dictionary pass it to the following method:\n\n``` swift\npublic enum Stage {\n  public static func dictionary(fromPlistAtURL url: URL) -\u003e StageBuildDictionaryProtocol?\n}\n```\n\n## Documentation\n\n[Documentation Here](/docs/README.md)\n\n## Author\n\nLeo G Dion, [BrightDigit, LLC](http://www.brightdigit.com)\n\n## License\n\nSwiftVer is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightdigit%2Fswiftver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrightdigit%2Fswiftver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightdigit%2Fswiftver/lists"}