{"id":25448113,"url":"https://github.com/jaywcjlove/swift-check-update","last_synced_at":"2025-11-02T00:30:36.917Z","repository":{"id":275979193,"uuid":"927811302","full_name":"jaywcjlove/swift-check-update","owner":"jaywcjlove","description":"Code to check if there is a new version on the App Store.","archived":false,"fork":false,"pushed_at":"2025-02-06T02:04:01.000Z","size":24,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T03:25:56.616Z","etag":null,"topics":["check-update","check-version","ios","macos","package","swift","swift-package","swiftui","update-checker","version"],"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/jaywcjlove.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-05T15:29:11.000Z","updated_at":"2025-02-12T03:23:56.000Z","dependencies_parsed_at":"2025-02-07T07:15:25.527Z","dependency_job_id":null,"html_url":"https://github.com/jaywcjlove/swift-check-update","commit_stats":null,"previous_names":["jaywcjlove/swift-check-update"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswift-check-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswift-check-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswift-check-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswift-check-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaywcjlove","download_url":"https://codeload.github.com/jaywcjlove/swift-check-update/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239349874,"owners_count":19624204,"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":["check-update","check-version","ios","macos","package","swift","swift-package","swiftui","update-checker","version"],"created_at":"2025-02-17T19:18:49.127Z","updated_at":"2025-02-17T19:18:49.812Z","avatar_url":"https://github.com/jaywcjlove.png","language":"Swift","funding_links":[],"categories":["Utilities and Extensions"],"sub_categories":[],"readme":"CheckUpdate\n===\n\n[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)\n![SwiftUI Support](https://shields.io/badge/SwiftUI-macOS%20%7C%20iOS%20-green?logo=Swift\u0026style=flat)\n\nCode to check if there is a new version on the App Store, to determine whether an update prompt needs to be shown.\n\n\u003e [!TIP]\n\u003e \n\u003e After the app is released, it will not update immediately on the App Store; it needs to wait 24 hours before it works properly.\n\n✦ My macOS/iOS application ✦\n\n\u003cp style=\"display: inline_block\"\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/key-clicker/\" title=\"KeyClicker for macOS\"\u003e\u003cimg align=\"center\" alt=\"KeyClicker\" height=\"50\" width=\"50\" src=\"https://github.com/user-attachments/assets/5a19fcb9-cb81-4855-b4ea-31c604d9612a\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/daybar/\" title=\"DayBar for macOS\"\u003e\u003cimg align=\"center\" alt=\"DayBar\" height=\"50\" width=\"50\" src=\"https://github.com/user-attachments/assets/b67d4a2e-92e2-4d8c-8c6f-2a1eb3e2fa93\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/iconed/\" title=\"Iconed for macOS\"\u003e\u003cimg align=\"center\" alt=\"Iconed\" height=\"50\" width=\"50\" src=\"https://github.com/user-attachments/assets/8a35dc7b-4faf-4e2a-9311-f66d6844a896\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/rightmenu-master/\" title=\"RightMenu Master for macOS\"\u003e\u003cimg align=\"center\" alt=\"RightMenu Master\" height=\"50\" width=\"50\" src=\"https://github.com/user-attachments/assets/39a76541-71bf-4de7-a01c-c62f0557dff5\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/paste-quick/\" title=\"Paste Quick for macOS\"\u003e\u003cimg align=\"center\" alt=\"Quick RSS\" height=\"50\" width=\"50\" src=\"https://github.com/user-attachments/assets/bdaad5b7-9810-44ce-8f17-8410864465d2\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/quick-rss/\" title=\"Quick RSS for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Quick RSS\" height=\"50\" width=\"50\" src=\"https://github.com/user-attachments/assets/374106b5-a448-4d1d-9ccb-b04b6bc681ed\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/web-serve/\" title=\"Web Serve for macOS\"\u003e\u003cimg align=\"center\" alt=\"Web Serve\" height=\"50\" width=\"50\" src=\"https://github.com/user-attachments/assets/e1d9f76f-0f3d-4ba5-8a15-253ee173bb1c\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/copybook-generator/\" title=\"Copybook Generator for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Copybook Generator\" height=\"50\" width=\"50\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/b90e42ff-158b-4534-82ca-5898fd0e8d73\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/devtutor/\" title=\"DevTutor for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"DevTutor for SwiftUI\" height=\"50\" width=\"50\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/f15c154d-0192-48eb-8e0e-9e245ffd974a\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/regex-mate/\" title=\"RegexMate for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"RegexMate\" height=\"50\" width=\"50\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/aabe5aa9-9a96-4390-8bed-c3e4023d0dea\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/time-passage/\" title=\"Time Passage for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Time Passage\" height=\"50\" width=\"50\" src=\"https://github.com/jaywcjlove/time-passage/assets/1680273/6f30e429-e6f3-4dbe-9921-a5effe2a05e9\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/IconizeFolder/\" title=\"IconizeFolder for macOS\"\u003e\u003cimg align=\"center\" alt=\"Iconize Folder\" height=\"50\" width=\"50\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/fa9d8b9c-1e51-4ded-877c-fa5b21c47220\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/TextSoundSaver/\" title=\"Textsound Saver for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Textsound Saver\" height=\"50\" width=\"50\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/0595e842-980b-4574-8891-a8ba853a08be\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/create-custom-symbols/\" title=\"Create Custom Symbols for macOS\"\u003e\u003cimg align=\"center\" alt=\"Create Custom Symbols\" height=\"50\" width=\"50\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/8cd022ce-a3f1-4e89-b7c6-6fbd0d4db77c\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/DevHub/\" title=\"DevHub for macOS\"\u003e\u003cimg align=\"center\" alt=\"DevHub\" height=\"50\" width=\"50\" src=\"https://github.com/user-attachments/assets/4a44a4fd-67ce-430b-af0a-72f18feaa47d\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/ResumeRevise/\" title=\"Resume Revise for macOS\"\u003e\u003cimg align=\"center\" alt=\"Resume Revise\" height=\"50\" width=\"50\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c9954a20-1905-48de-bdf8-d71837974aa2\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/palette-genius/\" title=\"Palette Genius for macOS\"\u003e\u003cimg align=\"center\" alt=\"Palette Genius\" height=\"50\" width=\"50\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/27340413-d355-45b2-8f6f-6ac37682d957\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/symbol-scribe/\" title=\"Symbol Scribe for macOS\"\u003e\u003cimg align=\"center\" alt=\"Symbol Scribe\" height=\"50\" width=\"50\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c7249f05-fa70-4def-a1e9-571d5f171fc9\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Usage\n\n```swift\nimport CheckUpdate\n\nCheckUpdate.checkVersion { isUpdateNeeded, appStoreVersion, currentVersion in\n    // Here it checks whether an update prompt needs to be shown.\n}\n\nCheckUpdate.checkVersion(bundleId: \"com.wangchujiang.daybar\") {\n    isUpdateNeeded,\n    appStoreVersion,\n    currentVersion in\n\n    // appStoreVersion -\u003e \"1.0\"\n    // currentVersion -\u003e \"2.0\"\n    // isUpdateNeeded -\u003e false\n}\n\nCheckUpdate.checkVersion(bundleId: \"com.wangchujiang.daybar\") {\n    isUpdateNeeded,\n    appStoreVersion,\n    currentVersion in\n\n    // appStoreVersion -\u003e \"2.0\"\n    // currentVersion -\u003e \"1.0\"\n    // isUpdateNeeded -\u003e true\n}\n```\n\n## License\n\nLicensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Fswift-check-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaywcjlove%2Fswift-check-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Fswift-check-update/lists"}