https://github.com/steamclock/version-check-swift
https://github.com/steamclock/version-check-swift
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/steamclock/version-check-swift
- Owner: steamclock
- Created: 2020-10-14T04:41:10.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-22T16:38:05.000Z (over 5 years ago)
- Last Synced: 2025-02-25T22:46:52.625Z (over 1 year ago)
- Language: Swift
- Size: 20.5 KB
- Stars: 1
- Watchers: 11
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VersionCheck
A library for doing checking of supported versions for a network service
Example usage:
```
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var upgradeDisplay: DefaultUpgradeDisplay?
var versionCheck: VersionCheck?
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
upgradeDisplay = DefaultUpgradeDisplay(isTestBuild: false)
versionCheck = VersionCheck(url: "https://myservice.com/api/version",
displayHandler: upgradeDisplay.displayStateChanged)
}
}
```
Expected JSON format:
```
{
"ios" : {
"minimumVersion": "1.1",
"blockedVersions": ["1.2.0", "1.2.1", "@301"],
"latestTestVersion": "1.4.2@400"
},
"android" : {
"minimumVersion": "1.1",
"blockedVersions": ["1.2.0", "1.2.1", "@301"],
"latestTestVersion": "1.4.2@400"
},
"serverForceVersionFailure": false,
"serverMaintenance": false
}
```