{"id":32321168,"url":"https://github.com/maziar/forceupdatekit","last_synced_at":"2026-02-20T09:32:19.888Z","repository":{"id":199797083,"uuid":"698155793","full_name":"maziar/ForceUpdateKit","owner":"maziar","description":"This repo is for checking the force update of app and handle the force update flow. (force update kit)","archived":false,"fork":false,"pushed_at":"2023-11-05T17:44:08.000Z","size":244,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-01T11:13:43.919Z","etag":null,"topics":["force-update","forceupdate","forceupdatekit","ios","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/maziar.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,"governance":null}},"created_at":"2023-09-29T09:29:29.000Z","updated_at":"2024-07-20T18:31:30.000Z","dependencies_parsed_at":"2023-10-18T01:15:15.558Z","dependency_job_id":null,"html_url":"https://github.com/maziar/ForceUpdateKit","commit_stats":null,"previous_names":["maziar/forceupdatekit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maziar/ForceUpdateKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maziar%2FForceUpdateKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maziar%2FForceUpdateKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maziar%2FForceUpdateKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maziar%2FForceUpdateKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maziar","download_url":"https://codeload.github.com/maziar/ForceUpdateKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maziar%2FForceUpdateKit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280614542,"owners_count":26360842,"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-23T02:00:06.710Z","response_time":142,"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":["force-update","forceupdate","forceupdatekit","ios","swift"],"created_at":"2025-10-23T12:05:03.092Z","updated_at":"2025-10-23T12:05:06.223Z","avatar_url":"https://github.com/maziar.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ForceUpdateKit\n\n| ForceUpdateKit |\n|---|\n| \u003cimg src='https://github.com/maziar/ReadmeFiles/blob/main/imgpsh_fullsize_anim.jpeg' width='200'\u003e\n\n[![Languages](https://img.shields.io/badge/language-swift%205.0%20|%20objc-FF69B4.svg?style=plastic)](#) \u003cbr/\u003e\n[![Platform](https://img.shields.io/badge/platform-iOS%20|%20tvOS-blue.svg?style=plastic)](http://cocoadocs.org/docsets/FSPagerView)\n[![Version](https://img.shields.io/cocoapods/v/FSPagerView.svg?style=plastic)](http://cocoadocs.org/docsets/FSPagerView) \n[![SPM compatible](https://img.shields.io/badge/SPM-compatible-FF9966.svg?style=plastic)](https://swift.org/package-manager/)\n\n\u003cb\u003eSWIFT\u003c/b\u003e\n\n**ForceUpdateKit** This repo is for checking the force update of app and handle the force update flow.\n\n## Features\n*  ***Force Update*** without implementing server and client\n*  ***Variety*** of style and configuration.\n*  ***Compatible*** with all platforms\n\n\n## Installation\n* Manually\n* Cocoapods\n* SPM (Swift Package Manager)\n\n### Manually\n1. ***[Download](https://github.com/maziar/ForceUpdateKit/archive/refs/heads/main.zip)*** the source code.\n2. Extract the zip file, simply drag folder ***Sources*** into your project.\n3. Make sure ***Copy items if needed*** is checked.\n\n### Cocoapods\n```ruby\nuse_frameworks!\ntarget '\u003cYour Target Name\u003e' do\n    pod 'ForceUpdateKit'\nend\n```\nhttps://cocoapods.org/pods/ForceUpdateKit\n\n\n### Swift Package Manager\n\n[Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.\n\nTo integrate ForceUpdateKit into your Xcode project using Swift Package Manager, add it to the dependencies value of your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/maziar/ForceUpdateKit.git\")\n]\n```\n\n\n## Tutorial\n* [Getting started](#getting_started)\n\n### 1. Getting started \u003ca id='getting_started'\u003e\u003c/a\u003e\n\n* Getting started with code\n\nin Appdelegate or SceneDelegate or wherever you need it you can call:\n```swift\nimport ForceUpdateKit\n\nTask {\n    await ForceUpdateKit().configure()\n }\n```\n\n## Demos\n* [Demo1 - FullScreen1](#fullscreen1)\n* [Demo2 - FullScreen2](#fullscreen2)\n* [Demo3 - FullScreen3](#fullscreen3)\n* [Demo4 - FullScreen4](#fullscreen4)\n* [Demo5 - Popover1](#popover1)\n* [Demo6 - Popover2](#popover2)\n\n### Demo1 - FullScreen1 \u003ca id=\"fullscreen1\"\u003e\u003c/a\u003e\n\n| FullScreen1 |\n|---|\n|\u003cimg src='https://github.com/maziar/ReadmeFiles/blob/main/fullscreen1.png' width='200'\u003e\n\n**e.g.**\n\n```swift\nTask {\n    await ForceUpdateKit().configure()\n }\n```\n\n\n## Demo2 - FullScreen2 \u003ca id=\"fullscreen2\"\u003e\u003c/a\u003e\n\n| FullScreen2 |\n|---|\n| \u003cimg src='https://github.com/maziar/ReadmeFiles/blob/main/fullscreen2.png' width='200'\u003e\n\n**e.g.**\n\n```swift\nTask {\n    let config = UpdateServiceConfig(style: .fullscreen2)\n    await ForceUpdateKit().configure(config: config)\n }\n```\n---\n\n## Demo3 - FullScreen3 \u003ca id=\"fullscreen3\"\u003e\u003c/a\u003e\n\n| FullScreen3 |\n|---|\n| \u003cimg src='https://github.com/maziar/ReadmeFiles/blob/main/fullscreen3.png' width='200'\u003e\n\n**e.g.**\n\n```swift\nTask {\n    let config = UpdateServiceConfig(style: .fullscreen3)\n    await ForceUpdateKit().configure(config: config)\n }\n```\n---\n\n## Demo4 - FullScreen4 \u003ca id=\"fullscreen4\"\u003e\u003c/a\u003e\n\n| FullScreen4 |\n|---|\n| \u003cimg src='https://github.com/maziar/ReadmeFiles/blob/main/fullscreen4.png' width='200'\u003e\n\n**e.g.**\n\n```swift\nTask {\n    let config = UpdateServiceConfig(style: .fullscreen4)\n    await ForceUpdateKit().configure(config: config)\n }\n```\n---\n\n## Demo5 - Popover1 \u003ca id=\"popover1\"\u003e\u003c/a\u003e\n\n| Popover1 |\n|---|\n| \u003cimg src='https://github.com/maziar/ReadmeFiles/blob/main/popover1.png' width='200'\u003e\n\n**e.g.**\n\n```swift\nTask {\n    let config = UpdateServiceConfig(style: .popover1)\n    await ForceUpdateKit().configure(config: config)\n }\n```\n \u003cimg src='https://github.com/maziar/ReadmeFiles/blob/main/popover1-backclear.png' width='200'\u003e\n\n**e.g.**\n\n```swift\nTask {\n    let config = UpdateServiceConfig(style: .popover1)\n    config.viewConfig.contentViewBackColor = .clear\n    await ForceUpdateKit().configure(config: config)\n }\n```\n---\n\n## Demo6 - Popover2 \u003ca id=\"popover2\"\u003e\u003c/a\u003e\n\n| Popover2 |\n|---|\n| \u003cimg src='https://github.com/maziar/ReadmeFiles/blob/main/popover2.png' width='200'\u003e\n\n**e.g.**\n\n```swift\nTask {\n    let config = UpdateServiceConfig(style: .popover2)\n    await ForceUpdateKit().configure(config: config)\n }\n```\n \u003cimg src='https://github.com/maziar/ReadmeFiles/blob/main/popover2-backclear.png' width='200'\u003e\n\n**e.g.**\n\n```swift\nTask {\n    let config = UpdateServiceConfig(style: .popover2)\n    config.viewConfig.contentViewBackColor = .clear\n    await ForceUpdateKit().configure(config: config)\n }\n```\n\n\n## Service Configuration\nthis is the default value ***Service configuration*** class that you configure all items that you want custom:\n\n```\npublic struct UpdateServiceConfig {\n    public var route: String = \"https://my.api.mockaroo.com/forceupdate.json?key=2202ab40\"\n    public var appId: String = Bundle.main.bundleIdentifier ?? String()\n    public var version: String = Bundle.main.releaseVersionNumber ?? String()\n    public var viewConfig: ForceUpdateViewConfig = ForceUpdateViewConfig()\n}\n```\n\nthat you can define or pass a new value for the route or use the default for using from our service.\n\n**e.g.**\n## Configuration Custom Server and Endpoint\n```swift\nTask {\n    let config = UpdateServiceConfig()\n    config.route = \"https://myapi.enpoint/forceupdate\"\n    await ForceUpdateKit().configure(config: config)\n }\n```\n\nIf you change the API endpoint for calling your server you should make the response that is expected from the Kit:\n\n```\n{\n  \"version\": \"Up to 12.349 version Apr 2024.\",\n  \"forceUpdate\": true,\n  \"title\": \"It's time to update\",\n  \"description\": \"It's time to update The version you are using is old, need to update to the latest version in order to experience new features.\",\n  \"iconUrl\": \"http://dummyimage.com/231x100.png/5fa2dd/ffffff.png\",\n  \"linkUrl\": \"https://apps.apple.com/us/app/telegram/id747648890\",\n  \"buttonTitle\": \"Update New Version\"\n}\n```\n\n\n## View and Style Configuration\nthis is the default value for ***View configuration*** class that you configure all items that you want custom:\n\n\n```\npublic class ForceUpdateViewConfig {\n    public var style: ForceUpdateViewStyle = .fullscreen1\n    public var updateButtonNortmalTitle: String = \"Update New Version\"\n    public var updateButtonSelectedTitle: String = \"Update New Version\"\n    public var updateButtonImage: UIImage = UIImage(named: \"\") ?? UIImage()\n    public var contentViewBackColor: UIColor = .white\n    public var popupViewBackColor: UIColor = .black\n    public var popupViewCornerRadius: CGFloat = 15.0\n    public var contentBackGroundImage: UIImage = UIImage(named: \"\",\n                                                         in: Bundle.module,\n                                                         compatibleWith: nil) ?? UIImage()\n    public var updateImageType: ImageType = .spaceship1\n    public var updateImage: UIImage?\n    public var updateImageColor: UIColor?\n    public var updateButtonFont = UIFont.systemFont(ofSize: 12, weight: .medium)\n    public var headerTitleFont = UIFont.systemFont(ofSize: 13, weight: .bold)\n    public var headerTitle = \"It's time to update\"\n    public var headerTitleColor: UIColor = .black\n    public var descriptionFont = UIFont.systemFont(ofSize: 12, weight: .medium)\n    public var descriptionText = \"It's time to update The version you are using is old, need to update the latest version in order to experience new features.\"\n    public var descriptionTextColor: UIColor = .gray\n    public var versionFont = UIFont.systemFont(ofSize: 10, weight: .bold)\n    public var versionText = \"Up to 12.349 version Apr 2024.\"\n    public var versionTextColor: UIColor = .gray\n    public var updateButtonBackColor: UIColor = .blue\n    public var lineColor: UIColor = .lightGray\n    public var updateButtonTitleColor: UIColor = .white\n    public var updateButtonCornerRadius: CGFloat = 20.0\n    public var updateButtonBorderWidth: CGFloat = 0.0\n    public var updateButtonBorderColor: UIColor = .clear\n}\n```\n**e.g.**\n```\nTask {\n    let config = UpdateServiceConfig()\n    config.viewConfig.style = .popover2\n    config.viewConfig.contentViewBackColor = .clear\n    config.viewConfig.popupViewBackColor = .black\n    config.viewConfig.headerTitle = \"my header title\"\n    config.viewConfig.updateButtonCornerRadius = 30\n    config.viewConfig.updateButtonBorderWidth = 1\n    config.viewConfig.updateButtonBorderColor = .yellow\n    config.viewConfig.headerTitleColor = .white\n    config.viewConfig.updateImageType = .gear\n    config.viewConfig.updateImageColor = .orange\n    config.viewConfig.updateButtonBackColor = .orange\n    config.viewConfig.versionTextColor = .orange\n    await ForceUpdateKit().configure(config: config)\n }\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaziar%2Fforceupdatekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaziar%2Fforceupdatekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaziar%2Fforceupdatekit/lists"}