{"id":19156142,"url":"https://github.com/applogistdev/alversioncontrol","last_synced_at":"2025-08-04T18:07:07.774Z","repository":{"id":56900633,"uuid":"261678664","full_name":"applogistdev/ALVersionControl","owner":"applogistdev","description":"App Market Version Controller ","archived":false,"fork":false,"pushed_at":"2020-05-19T12:33:32.000Z","size":105,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T01:46:23.736Z","etag":null,"topics":["app","force-update","version-control","versioning"],"latest_commit_sha":null,"homepage":null,"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/applogistdev.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":"2020-05-06T07:04:38.000Z","updated_at":"2020-05-19T12:33:35.000Z","dependencies_parsed_at":"2022-08-21T02:20:43.664Z","dependency_job_id":null,"html_url":"https://github.com/applogistdev/ALVersionControl","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/applogistdev%2FALVersionControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applogistdev%2FALVersionControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applogistdev%2FALVersionControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applogistdev%2FALVersionControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/applogistdev","download_url":"https://codeload.github.com/applogistdev/ALVersionControl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252834051,"owners_count":21811300,"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":["app","force-update","version-control","versioning"],"created_at":"2024-11-09T08:33:24.576Z","updated_at":"2025-05-07T07:34:19.432Z","avatar_url":"https://github.com/applogistdev.png","language":"Swift","readme":"# ALVersionControl\n\n[![CI Status](https://img.shields.io/travis/sonifex/ALVersionControl.svg?style=flat)](https://travis-ci.org/sonifex/ALVersionControl)\n[![Version](https://img.shields.io/cocoapods/v/ALVersionControl.svg?style=flat)](https://cocoapods.org/pods/ALVersionControl)\n[![License](https://img.shields.io/cocoapods/l/ALVersionControl.svg?style=flat)](https://cocoapods.org/pods/ALVersionControl)\n[![Platform](https://img.shields.io/cocoapods/p/ALVersionControl.svg?style=flat)](https://cocoapods.org/pods/ALVersionControl)\n\n\n\n\nALVersionControl is an application update process controller.   There are 3 types of update status which described below.\nAlVersionControl does not provide any api call. You have to make it in own way.\n\n\n### Version Control API structure\n\n#### Request: \nALVersionControl has handy request model called **ALVersionControlRequest** which has only 2 variable. You may use it in your api call. You have to store latest versions on your server database for both iOS and Android.\n\n```swift\npublic  struct  ALVersionControlRequest: Encodable {\n\n    ///  OS Type (1:iOS - 2:Android)\n    let os: Int\n    ///  App bundle version (e.g. 1.0.2)\n    let version: String\n\n    public  init() {\n        self.os = 1\n        self.version = Bundle.main.infoDictionary?[\"CFBundleShortVersionString\"] as? String ?? \"\"\n    }\n}\n``` \nJson\n```json\n{\n    \"os\": 1,\n    \"version\": \"1.0.2\"\n}\n```\n\n\n\n#### Response\nALVersionControl has response model called **ALVersionControlResponse** which you have to use in order to us handle controlling process. You may use your own model, but you have to convert it to this model in \"versionControllerAPIHandler\" method to pass through completion.\n\n```swift\npublic  enum  ALVersionControlStatus: Int, Codable {\n\n    ///  All good. App is up to date\n    case upToDate = 0\n    ///  Optional update available\n    case optional = 1\n    ///  Force update available\n    case force = 2\n}\n\npublic  struct  ALVersionControlResponse: Decodable {\n    \n    ///  The info message which inform to user there is a new update.\n    let message: String?\n    ///  The status of new update.\n    let status: ALVersionControlStatus?\n    ///  The market url which lead the user to update the app\n    let url: URL?\n\n    public init(message: String?, status: ALVersionControlStatus?, url: URL?) {\n        self.message = message\n        self.status = status\n        self.url = url\n    }\n}\n```\nJson\n```json\n{\n    \"message\": \"Hey! You have a new update.\",\n    \"status\": 1,\n    \"url\": \"app market url\"\n}\n```\n\n1. **Up to date [0]** : So there is no update. All is good.\n2. **Optional Update [1]** : To inform users there is a new update and user may update the app. Once user dismiss the alert, we will not bother again.\n3. **Force Update [2]** : User must update the application in order to keep using the app. Hopefully never use it.\n\n\n\n\n## Usage\n\nSetup \n```swift\nALVersionControl.shared.setup(delegate: self)\n```\n\nYou have to handle applicationDidBecomeActive status. Just calling the appDidBecomeActive method is enough.\n```swift\nfunc  applicationDidBecomeActive(_ application: UIApplication) {\n    ALVersionControl.shared.appDidBecomeActive()\n}\n```\n\n## Language Support\n\nTurkish, English, Arabic\n\n*Feel free to add more. Pull requests are welcome :)*\n\n\n## Installation\n\n### Swift Package Manager\n\nOnce you have your Swift package set up, adding `ALVersionControl` as a dependency is as easy as adding it to the dependencies value of your `Package.swift`.\n\n```swift\ndependencies: [\n.package(url: \"https://github.com/applogistdev/ALVersionControl.git\", from: \"0.2.0\")\n]\n```\n\n### CocoaPods\n\nTo integrate `ALVersionControl` into your Xcode project using [CocoaPods](http://cocoapods.org), specify it in your `Podfile`\n\n```ruby\npod 'ALVersionControl'\n```\n\n## Author\n\nsonifex, sonerguler93@gmail.com\n\n## License\n\nALVersionControl is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplogistdev%2Falversioncontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapplogistdev%2Falversioncontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplogistdev%2Falversioncontrol/lists"}