{"id":19110069,"url":"https://github.com/haidalinda/AppVersion","last_synced_at":"2026-05-31T12:30:15.427Z","repository":{"id":77939313,"uuid":"293964577","full_name":"hkellaway/AppVersion","owner":"hkellaway","description":"AppVersion is a Swift μ-Library offering a structured type around iOS app versions that adhere to Semantic Versioning :1234:","archived":false,"fork":false,"pushed_at":"2020-09-28T00:16:40.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-01-03T03:45:30.760Z","etag":null,"topics":["appversion","ios","semver","swift"],"latest_commit_sha":null,"homepage":"","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/hkellaway.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-09T00:59:41.000Z","updated_at":"2020-09-27T23:48:04.000Z","dependencies_parsed_at":"2023-03-05T08:45:40.272Z","dependency_job_id":null,"html_url":"https://github.com/hkellaway/AppVersion","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkellaway%2FAppVersion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkellaway%2FAppVersion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkellaway%2FAppVersion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkellaway%2FAppVersion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hkellaway","download_url":"https://codeload.github.com/hkellaway/AppVersion/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240163756,"owners_count":19758061,"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","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":["appversion","ios","semver","swift"],"created_at":"2024-11-09T04:23:31.253Z","updated_at":"2026-05-31T12:30:15.365Z","avatar_url":"https://github.com/hkellaway.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AppVersion \n![Swift version](https://img.shields.io/badge/Swift-5.0-orange.svg)\n[![SPM Compatible](https://img.shields.io/badge/SPM-compatible-informational.svg)](https://github.com/apple/swift-package-manager)\n[![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-informational.svg)](https://github.com/CocoaPods/CocoaPods)\n[![License](https://img.shields.io/badge/License-MIT-lightgrey.svg)](https://github.com/hkellaway/AppVersion/blob/trunk/LICENSE)\n[![Build Status](https://travis-ci.org/hkellaway/AppVersion.svg?branch=trunk)](https://travis-ci.org/hkellaway/AppVersion)\n\nA Swift μ-Library for determining app version\n\n## Basic Usage\n\nAppVersion is a simple little library that offers a structured type around typical app versioning. It currently supports the format of `major.minor.patch`, a subspecies of [Semver](https://semver.org/).\n\n### Retrieving from Bundle\n\n``` swift\nlet currentAppVersion: AppVersion? = .fromBundle\n```\n\n### Creation from String\n\nAn `AppVersion` can conveniently be created from a `String`:\n\n``` swift\nlet appVersion: AppVersion = \"1.2.3\"\n```\n\n### Comparison\n\nComparison operations (`==`, `\u003e`, `\u003c`, etc.) work seamlessly:\n\n``` swift\nlet minimumAppVersion: AppVersion = \"2.0.0\"\nguard let currentAppVersion: AppVersion = .fromBundle, currentAppVersion \u003e= minimumAppVersion else {\n  // send user to App Store\n}\n```\n\n## SemVer Utility\n\n### Determining Stability\n\nTo determine whether the version is stable / has a public API:\n\n``` swift\nappVersion.isStable\n```\n\n### Next Version\n\nTo detemrine the next version:\n\n``` swift\nappVersion.nextMajor() // i.e. 1.2.3 goes to 2.0.0\nappVersion.nextMinor() // i.e. 1.2.3 goes to 1.3.0\nappVersion.nextPatch() // i.e. 1.2.3 goes to 1.2.4\n```\n\n## Installation\n\n### Swift Package Manager\n\nSee [Adding Package Dependencies to Your App](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app). Point to the desired version or the `trunk` branch.\n\n### CocoaPods\n\n```ruby\npod 'AppVersion', :git =\u003e 'https://github.com/hkellaway/AppVersion.git', :branch =\u003e 'trunk'\n```\n\n## Credits\n\nAppVersion was created by [Harlan Kellaway](http://hkellaway.github.io).\n\n## License\n\nAppVersion is available under the MIT license. See the [LICENSE](https://github.com/hkellaway/AppVersion/blob/trunk/LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaidalinda%2FAppVersion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaidalinda%2FAppVersion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaidalinda%2FAppVersion/lists"}