Latest 0.0.1
Homepage https://github.com/salyangoz/updateme-ios
License MIT
Platforms ios 10.0
Dependencies SCLAlertView
Frameworks UIKit
Authors

UpdateMe

Version
License
Platform

A powerful force update library for Swift.

UpdateMe

You can set Version of your app remote and show dialog to force update your app whenever you want.

Requirements

In order to use this library you need to create Firebase project and add RemoteConfig parameters. Configuration showed in Introduction section.

Installation

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

pod "UpdateMe"

Introduction

  1. Create Firebase project http://firebase.google.com
  2. Firebase will give you google-services.json file. Paste this file into your projects root directory.
  3. In the left menu choose remote config and add these parameters.
  4. Add these parameters
Parameter Key Default Value
ios_update_me_required Do you want to force update App (Ex: false true)
ios_update_me_current_version The version of your app(Ex: 1.0.0)
ios_update_me_store_url The store url(Ex: http://play.google.com/store/apps/com.salyangoz.torrentfinder)
ios_update_me_dialog_title Update dialog title(You can leave blank)
ios_update_me_dialog_description Update dialog message(You can leave blank)

Usage

Basic Usage

You should add this code block in View Controller’s viewDidAppear function.

override func viewDidAppear(_ animated: Bool) {

        //Basic Usage
        UpdateMe.with().build().check()

}
Advanced Usage

Features

  1. Set dialog visibility
  2. Add listeners to Positive and Negative button clicks.
  3. Set positive and negative button text and colors.
  4. Set custom icon
override func viewDidAppear(_ animated: Bool) {

        //Advanced Usage

        let update:UpdateMe = UpdateMe.with(fetchIntervalInSeconds: 30)
            .setDialogIcon(image: UIImage(named: "info.png")!)
            .setTopColor(color: 0xDF5745)
            .onPositiveButtonClick(onPositiveButtonClickListener: self)
            .onNegativeButtonClick(onNegativeButtonClickListener: self)
            .onUpdateNeeded(onUpdateNeededListener: self)
            .setContinueButtonVisibility(visible: true)
            .setPositiveButtonText(title: "Update")
            .setPositiveButtonTextColor(color: UIColor.orange)
            .build()
        update.check()

}

Special Thanks

Custom alert dialogs pulled from SCLAlertView for Swift repository. https://github.com/vikmeup/SCLAlertView-Swift

Author

Salyangoz Co. , [email protected]

License

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

Latest podspec

{
    "name": "UpdateMe",
    "version": "0.0.1",
    "summary": "A powerful force update library for iOS(Swift)",
    "description": "A powerful force update library for Swift. Alert dialog will show when you need to force update your application. You can set this configuration with Firebase Remote anytime, anywhere.",
    "homepage": "https://github.com/salyangoz/updateme-ios",
    "license": "MIT",
    "authors": {
        "Salyangoz Co.": "[email protected]"
    },
    "source": {
        "git": "https://github.com/salyangoz/updateme-ios.git",
        "tag": "0.0.1"
    },
    "social_media_url": "https://twitter.com/salyangoz",
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "UpdateMe/UpdateMe/Classes/**/*",
    "resources": "UpdateMe/UpdateMe/Assets/**/*",
    "libraries": [
        "c++",
        "icucore",
        "sqlite3",
        "z"
    ],
    "frameworks": [
        "UIKit"
    ],
    "vendored_frameworks": [
        "UpdateMe/UpdateMe/Frameworks/Firebase/Analytics/FirebaseAnalytics.framework",
        "UpdateMe/UpdateMe/Frameworks/Firebase/Analytics/FirebaseInstanceID.framework",
        "UpdateMe/UpdateMe/Frameworks/Firebase/Analytics/GoogleUtilities.framework",
        "UpdateMe/UpdateMe/Frameworks/Firebase/Analytics/nanopb.framework",
        "UpdateMe/UpdateMe/Frameworks/Firebase/Analytics/FirebaseNanoPB.framework",
        "UpdateMe/UpdateMe/Frameworks/Firebase/Analytics/GoogleToolboxForMac.framework",
        "UpdateMe/UpdateMe/Frameworks/Firebase/Analytics/FirebaseCore.framework",
        "UpdateMe/UpdateMe/Frameworks/Firebase/Analytics/FirebaseCoreDiagnostics.framework",
        "UpdateMe/UpdateMe/Frameworks/Firebase/RemoteConfig/FirebaseRemoteConfig.framework",
        "UpdateMe/UpdateMe/Frameworks/Firebase/RemoteConfig/Protobuf.framework"
    ],
    "pod_target_xcconfig": {
        "OTHER_LDFLAGS": "$(inherited) -ObjC"
    },
    "dependencies": {
        "SCLAlertView": []
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This