https://github.com/nextfaze/ios-manup
A server side check of the app version and configuration options for your iOS app.
https://github.com/nextfaze/ios-manup
Last synced: 11 months ago
JSON representation
A server side check of the app version and configuration options for your iOS app.
- Host: GitHub
- URL: https://github.com/nextfaze/ios-manup
- Owner: NextFaze
- License: apache-2.0
- Created: 2012-10-23T00:45:17.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2020-08-03T01:04:29.000Z (almost 6 years ago)
- Last Synced: 2024-04-20T13:40:57.871Z (about 2 years ago)
- Language: Objective-C
- Homepage:
- Size: 779 KB
- Stars: 5
- Watchers: 11
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
ManUp
[](https://travis-ci.org/NextFaze/ManUp)
[](http://cocoapods.org/pods/ManUp)
[](http://cocoapods.org/pods/ManUp)
[](http://cocoapods.org/pods/ManUp)
Adds a server side check for a mandatory app update and server-side configuration options to your iOS/tvOS application.
Useful things you can do with ManUp:
- Prevent users from using the app during server-side maintenance 🚧
- Remotely disable your app (killswitch) 🛑
- Disable specific features in the app from the server 🙅♂️
- Recommend (or require) that users update to a specific version or higher ⏬
## Installation
The preferred method is via CocoaPods:
```pod
pod 'ManUp'
```
## Usage
ManUp will download a ManUp configuration file (json) that is hosted on a server of your choice. This file will have the current app store version, the minimum version, and a URL to the app store or app website.
```json
{
"ios": {
"url": "https://itunes.apple.com/app/id0000000?mt=8",
"latest": "2.0",
"minimum": "1.1",
"enabled": true
}
}
```
Running ManUp will download this file and compare it to the installed app's version to determine if there is an update available (`latest`), or if there is a mandatory update required (`minimum`).
#### Swift
```swift
import ManUp
// keep a strong reference
let manUp = ManUp()
// typically in applicationDidBecomeActive
self.manUp.configURL = URL(string: "https://clientfiles.nextfaze.com/eva/maintenanceMode.json")
self.manUp.delegate = nil
self.manUp.validate()
```
#### Objective-C
```objc
#import
// keep a strong reference
@property (nonatomic, strong) ManUp *manUp;
self.manUp = [[ManUp alloc] initWithConfigURL:[NSURL URLWithString:@"https://yourserver.com/config.json"] delegate:self];
[self.manUp validate];
```
You can also add any keys and values to the json file, which will be accessible like so:
```objc
id value = [self.manUp settingForKey:"key"];
```
This can be used however you see fit, for example to enable/disable app features.