PopupUpdate 1.0.3

PopupUpdate 1.0.3

Maintained by Upnetix, Dimitar Petrov, Vesela Ilchevska, ivan.georgiev, dimitar.petrov, Kostadin Zamanov.



  • By
  • Scalefocus

PopupUpdate

Version License Platform

PopupUpdate is a library that provides us an easy way to show a popup for a new available version for the current application. PopupUpdate purpose is to make the user to update the application. It shows a popup, which is configurable. You can choose to have a normal popup, which reminds the user that a new version is available and the user can ignore it, or you can choose "force update", which forces the user to update the application.

Supports Light Mode:

drawing

drawing


And Dark Mode:

drawing

drawing

Usage

First you should import the library:

import PopupUpdate

Force update:

 /// Force update example
PUUpdateApplicationManager.shared.checkForUpdate(shouldForceUpdate: true,
                                                    minimumVersionNeeded: "1.2.3",
                                                    urlToOpen: "https://www.upnetix.com/") { error in
    if let error = error {
        print("Error Supported version: \(error)")
    }
}

Normal update:

 /// Normal nofity update example
PUUpdateApplicationManager.shared.checkForUpdate(shouldForceUpdate: false,
                                                    minimumVersionNeeded: "1.2.3",
                                                    urlToOpen: "https://www.upnetix.com/")

Update with all parameters:

PUUpdateApplicationManager.shared.checkForUpdate(shouldForceUpdate: false,
                                                    minimumVersionNeeded: "2.0.1",
                                                    urlToOpen: "https://www.upnetix.com/",
                                                    currentVersion: "1.0.1",
                                                    keyWindow: window,
                                                    alertTitle: "AlertTitle",
                                                    alertDescription: "AlertDescription",
                                                    updateButtonTitle: "UpdateButton",
                                                    okButtonTitle: "Ok") { error in
    if let error = error {
        print("Error Supported version: \(error)")
    }
}

Example

Try it out. You can download and run the example project, clone the repo, and run pod install.

Installation

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

pod 'PopupUpdate'

and don't forget to install the pod by running the following command in the terminal from the directory of your project:

pod install

Author

Upnetix, [email protected]

License

PopupUpdate is available under the MIT license. See the LICENSE file for more info.