Giter Club home page Giter Club logo

unsupportedosversionalert's Introduction

UnsupportedOSVersionAlert

This source codes alerts your users if they use your app with an unsupported version of iOS (e.g. iOS 10.0 beta). The alert looks like this:

alt text

Works with iOS 7.0 upwards (please test with iOS 7 if you still have Xcode 6 installed).

The AlertController shows only ONCE for each system version (e.g. only once for iOS 10.0 beta). If you would like to change this behavior, you can do this in the checkOSVersion method by removing the NSUserDefaults if queries.

Implementation

  • Drag the UnsupportedOSVersionAlert.swift file into your project
  • Make your AppDelegate a delegate of OSVersionCheckerDelegate
class AppDelegate: UIApplicationDelegate, OSVersionCheckerDelegate 
  • Implement the delegate method in your AppDelegate
func didCheckOSVersion(supported: Bool) {
    if !supported {
        self.window?.makeKeyAndVisible()
        OSVersionAlert.show()
    }
}
  • In your application didFinishLaunchingWithOptions, use the OSVersionChecker API to set the delegate, the earliest supported version and the latest supported version
OSVersionChecker.checkOSVersion(self, earliest: "8.1", latest: "9.1.3")
  • [Work in Progress] Drag the language files into your project.

Contribution

  • If you'd like to contribute please submit a pull request via GitHub.
  • Speaking a language that is currently not supported by UnsupportedOSVersionAlert? Provide us your Localizations.

Like UnsupportedOSVersionAlert? Get us a beer ;-)

Donate

License

Feel free to use this source in any of your projects. If you'd like to acknowledge the author, feel free to link to www.caloon.co.

unsupportedosversionalert's People

Contributors

caloon avatar

Watchers

Carabineiro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.