SSAppUpdater 1.6.0

SSAppUpdater 1.6.0

Maintained by Simform Solutions.



  • By
  • Simform Solutions

SSAppUpdater

SSAppUpdater is an open-source framework that compares the current version of the app with the store version and returns the essential details of it like app URL, new app version number, new release note, etc. So you can either redirect or notify the user to update their app.

Swift Version License Carthage Compatible SwiftPM Compatible Platform PRs Welcome

Screenshots

Update Type

Force Update Optional Update Skip Version
Alt text Alt text Alt text

Features!

  • Check for new version of your installed application
  • Provides new version release note
  • Provides AppID and AppStore URL
  • CocoaPods

Requirements

  • iOS 10.0+
  • Xcode 9+

Installation

CocoaPods

  • You can use CocoaPods to install SSAppUpdater by adding it to your Podfile:

     use_frameworks!
     pod 'SSAppUpdater'
    
  • import SSAppUpdater

Manually

  • Download and drop SSAppUpdater folder in your project.
  • Congratulations!

Swift Package Manager

  • When using Xcode 11 or later, you can install SSAppUpdater by going to your Project settings > Swift Packages and add the repository by providing the GitHub URL. Alternatively, you can go to File > Swift Packages > Add Package Dependencies...
dependencies: [
    .package(url: "https://github.com/SimformSolutionsPvtLtd/SSAppUpdater.git", from: "1.1.0")
]

Carthage

  • Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage

To integrate SSAppUpdater into your Xcode project using Carthage, add the following line to your Cartfile:

github ""SimformSolutionsPvtLtd/SSAppUpdater""

Run carthage to build and drag the SSAppUpdater(Sources/SSAppUpdater) into your Xcode project.

How It Works

  • SSAppUpdater compares the currently installed version of your iOS app with the new store version that is currently available in the App Store. When an update is available, SSAppUpdater is able to present the new version number, Appstore URL, App ID, and release notes to the user giving them the choice to update.

  • How does SSAppUpdater achieve this? Firstly, it makes use of the iTunes Search API to retrieve the information.

     isForceUpdate: false           
     updateAlertFrequency: .always   
     showDefaultAlert: true         
    
  • Along with this, the isForceUpdate Boolean value checks that the user wants to force update or not.

  • Using the updateAlertFrequency, the user can choose alert display time. default value will be .always. Alternative values of this property are daily,weekly and monthly.

  • The SSAppUpdater allow developers to create a custom UI if needed. showDefaultAlert Boolean value checks that the user wants to show default Alert or Custom UI.

Usage example

Implementation

  • Implementing SSAppUpdater quite easy just add two line code in your AppDelegate.swift or anywhere in your app you need. (The block will return the version information)

AppDelegate.swift Example

import SSAppUpdater
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
        window?.makeKeyAndVisible()

        //defaultExample
        SSAppUpdater.shared.performCheck { (versionInfo) in
            // Version Info have all the app update releated information
            // Display AppUpdate UI based on versionInfo.isAppUpdateAvailable flag
        }
        
        //customExample
        SSAppUpdater.shared.performCheck(isForceUpdate: false, updateAlertFrequency: .always, showDefaultAlert: true) { (versionInfo) in
           // Version Info have all the app update releated information
        }
    }
}

Inspired

  • SSAppUpdater inspired from Siren