{"id":3256,"url":"https://github.com/amebalabs/AppVersion","last_synced_at":"2025-08-03T13:32:30.657Z","repository":{"id":50908199,"uuid":"159897119","full_name":"amebalabs/AppVersion","owner":"amebalabs","description":"Keep users on the up-to date version of your App.","archived":false,"fork":false,"pushed_at":"2021-05-27T23:54:50.000Z","size":2037,"stargazers_count":36,"open_issues_count":7,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-09T20:20:50.383Z","etag":null,"topics":["appstore","cocoapods","swift","uilabel","uitableview","version-manager"],"latest_commit_sha":null,"homepage":"http://appversion.ameba.co","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/amebalabs.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":"2018-12-01T01:27:35.000Z","updated_at":"2024-09-12T21:22:52.000Z","dependencies_parsed_at":"2022-08-29T23:00:22.305Z","dependency_job_id":null,"html_url":"https://github.com/amebalabs/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/amebalabs%2FAppVersion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amebalabs%2FAppVersion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amebalabs%2FAppVersion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amebalabs%2FAppVersion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amebalabs","download_url":"https://codeload.github.com/amebalabs/AppVersion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228548567,"owners_count":17935221,"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":["appstore","cocoapods","swift","uilabel","uitableview","version-manager"],"created_at":"2024-01-05T20:16:35.924Z","updated_at":"2024-12-07T01:30:46.900Z","avatar_url":"https://github.com/amebalabs.png","language":"Swift","readme":"# 📲  App Version  [![Build Status](https://travis-ci.com/amebalabs/AppVersion.svg?branch=master)](https://travis-ci.com/amebalabs/AppVersion) ![Swift Support](https://img.shields.io/badge/Swift-4.2-orange.svg) ![Documentation](https://github.com/amebalabs/AppVersion/blob/master/docs/badge.svg) [![Version](https://img.shields.io/cocoapods/v/AppVersion.swift.svg?style=flat)](http://cocoapods.org/pods/AppVersion.swift) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg)](https://swift.org/package-manager/)\n\n### Don't let you users to get stuck on outdated version of your app.\n\n- [x] Automatic update tracking using [**Semantic Versioning**](https://semver.org/)\n- [x] Buil-in UI alerts\n- [x] Rich set of delegate methods\n- [x] [Fully documented ](https://appversion.ameba.co)\n- [x] Good test coverage\n- [x] [Small code base](https://github.com/amebalabs/AppVersion/blob/master/.cloc.report)\n- [x] No external dependencies\n- [x] Available through all major package managers: Cocoapods, Cartage and Swift Package Manager \n\n---\n\n## Table of Contents\n- [Screenshots](https://github.com/amebalabs/AppVersion/#screenshots)\n- [Requirements](https://github.com/amebalabs/AppVersion/#requirements)\n- [Installation](https://github.com/amebalabs/AppVersion/#nstallation)\n- [Features](https://github.com/amebalabs/AppVersion/#features)\n    - [Delegates](https://github.com/amebalabs/AppVersion/#delegates)\n- [Example](https://github.com/amebalabs/AppVersion/#example)\n- [Author](https://github.com/amebalabs/AppVersion/#author)\n\n---\n\n## Screenshots\n### Update UI alerts\n\n1. Skippable alert\n2. Unskippable alert (Default)\n3. Blocking alert\n\n\u003cp align=\"center\"\u003e\n  \u003cimg height=\"450\" src=\"https://raw.githubusercontent.com/amebalabs/AppVersion/master/Images/UIAlert.png\"\u003e\n\u003c/p\u003e\n\n### Custom UILabel and UITableView footer\n\u003cp align=\"center\"\u003e\n  \u003cimg height=\"250\" src=\"https://raw.githubusercontent.com/amebalabs/AppVersion/master/Images/UITableView_short.png\"\u003e\n\u003c/p\u003e\n\n- Four formatting options available(`AppInfo.VersionFormat`):\n    - Short(version only): 1.0.0\n    - Short with app name: AppVersion 1.0.0\n    - Long(version +  build): 1.0.0(42)\n    - Long with app name: 1.0.0(42)\n\n## Requirements\n\n- Swift 4.2\n- Xcode 10 or greater\n- iOS 11.0 or greater\n\n## Installation\n\n### CocoaPods\n\nAppVersion is available through [CocoaPods](http://cocoapods.org). To install it add the following line to your Podfile:\n\n```ruby\npod \"AppVersion.swift\"\n```\n\n### Carthage\n\nIf you’re using [Carthage](https://github.com/Carthage/Carthage),  add AppVersion to your `Cartfile`:\n\n```\ngithub \"amebalabs/AppVersion\"\n```\nMake sure to add `AppVersion.framework` to \"Linked Frameworks and Libraries\" and \"copy-frameworks\" Build Phases.\n\n### Swift Package Manager\nTBD\n\n\n## Usage\n\nSetup AppVersion in your AppDelegate.swift, code is self-explanatory:\n\n```swift\n    func application(_ application: UIApplication,\n                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -\u003e Bool {\n        let appVersion = AppVersion.shared\n        appVersion.updateFrequency = 1 // I want to check for updates once a day\n        appVersion.alertsEnabled = true // I want UI alerts, presenting update options\n        appVersion.alertType = .skippable // I want UI alert to include \"Skip\" button\n        appVersion.neverEnabled = true // I want UI alert to include \"Never\" butoon\n        appVersion.alertPresentationStyle = .actionSheet // I want UI presented as an actionSheet\n        appVersion.checkBeforeUpdatePresented = { // I want to present UI only if App Store version has more than 1 review and average rating is higher than 3\n            return (appVersion.appStoreVersionInfo?.ratingsCount ?? 0) \u003e 1\n                \u0026\u0026 (appVersion.appStoreVersionInfo?.averageRating ?? 0) \u003e 3\n        }\n        appVersion.run()\n        return true\n    }\n\n```\n### Delegates\n\nEach meaningfull update tracking event provided as delegate (`AppVersionDelegate`). All delegates are optional, so you can implement only the one you need.\nDelegates can be used even if UI Alerts are disabled, for example you can choose to implement your own UI.\nPlease refer to documentation for more details.\n\n### UILabel and UITableView\n#### Using Storyboard\nCreate AppVersion label in storyboard: Drag UILabel on your storyboard and set class to `AppVersionLabel`\n\n\u003cimg height=\"180\" src=\"https://raw.githubusercontent.com/amebalabs/AppVersion/master/Images/Storyboard_class.png\"\u003e\n\nAfter that set format name in Attributes Inpector:\n\u003cimg height=\"130\" src=\"https://raw.githubusercontent.com/amebalabs/AppVersion/master/Images/Storyboard_format.png\"\u003e\n\n\n####  Create  `AppVersionLabel` programatically:\n\n```\nlet versionLabel = AppVersionLabel()\nversionLabel.format = format\nversionLabel.textAlignment = .center\nversionLabel.textColor = .red\n```  \n\n#### Add version in UITableView footer:\n```swift\ntableView.addVersionFooter(with: .longWithName)\n```\nor\n```\ntableView.addVersionFooter(with: .long, alignment: .right, textColor: .lightGray, footerHeight: 22)\n```\n## Author\n- Website: [Ameba](https://ameba.co) \n- Gtihub [@amebalabs](https://github.com/amebalabs/)\n## License\n\nAppVersion is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":["App Store"],"sub_categories":["Web View"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famebalabs%2FAppVersion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famebalabs%2FAppVersion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famebalabs%2FAppVersion/lists"}