Skip to content

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.

License

SimformSolutionsPvtLtd/SSAppUpdater

Repository files navigation

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(iOS)

Force Update Optional Update Skip Version

Update Type(macOS)

Force update Optional update
Skip version Update with custom alert

Features!

  • Check for new version of your installed application
  • Provides new version release note
  • Provides AppID and AppStore URL
  • Provides support of custom alerts for updates.
  • CocoaPods

Requirements

  • iOS 13.0+
  • macOS 11.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.

  • Parameters usage:

    • isForceUpdate - Boolean value checks that the user wants to force update or not.
    • updateAlertFrequency - The user can choose alert display time. default value will be .always. Alternative values of this property are daily,weekly and monthly.
    • showDefaultAlert - Developers using SSAppUpdater can customize the user interface as required. The Boolean value "showDefaultAlert" determines whether to display the default alert or a custom UI, based on the user's preference.
    • skipVersionAllow - This feature lets users activate the "skipVersion" functionality.
    • redirectToMacAppStore - This setting is specifically for macOS users. It gives them the choice to either be directed to the App Store app or stay within the current application to access the App Store.

Usage example

Implementation

  • Implementing SSAppUpdater quite easy just add below provided code in your AppDelegate.swift or anywhere in your app you need.

  • The block will provide version information which can then be utilized to generate an custom alert.

    //defaultExample
    SSAppUpdater.shared.performCheck { (versionInfo) in
    // Version Info have all the app update related information
    // Display AppUpdate UI based on versionInfo.isAppUpdateAvailable flag
    }

    //customExample
    SSAppUpdater.shared.performCheck(isForceUpdate: false, updateAlertFrequency: .always, showDefaultAlert: false) { (versionInfo) in
    // Version Info have all the app update related information
    }

Inspired

  • SSAppUpdater inspired from Siren

Check out our other Libraries

About

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.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published