AppVersionEnforcer 0.1.6

AppVersionEnforcer 0.1.6

TestsTested
LangLanguage SwiftSwift
License Apache 2
ReleasedLast Release Jul 2016
SPMSupports SPM

Maintained by Romson Preechawit.



AppVersionEnforcer

Requirements

iOS > 8

Currently, AppVersionEnforcer only work with a very specific sever setting.

Installation

AppVersionEnforcer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "AppVersionEnforcer"

Usage

Currently, AppVersionEnforcer only work with a very specific sever setting.

Simply create an instance of AppVersionEnforcer, with your base API URL, within the AppDelegate. Then, call ‘enforcer.checkVersion(, currentVersion: )’ in the application 'didFinishLaunchingWithOptions’. And call 'enforcer.applicationDidBecomeActive(application)’ in the 'applicationDidBecomeActive(application: UIApplication)’

// AppDelegate.swift

var window: UIWindow?
var enforcer: AppVersionEnforcer!

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
enforcer = AppVersionEnforcer(apiURL: "https://<YOUR_BASE_API_URL>/", window: window)
enforcer.checkVersion("<YOUR_BUNDLE_IDENTIFIER>", currentVersion: "1.0.0")
}


func applicationDidBecomeActive(application: UIApplication) {
enforcer.applicationDidBecomeActive(application)
}

The AppVersionEnforcer will communicate with the server and display update notice to the user depending on the parameters receive from the server

Author

Romson Preechawit

License

Copyright © 2016 Romson Preechawit

AppVersionEnforcer is licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.