Swiftpack.co - knottx/AppStoreManager as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by knottx.
knottx/AppStoreManager 1.3.3
A new version checking framework for iOS. available on CocoaPods.
⭐️ 2
🕓 15 weeks ago
iOS
.package(url: "https://github.com/knottx/AppStoreManager.git", from: "1.3.3")

AppStoreManager is a new version checking framework for iOS.

📲 Installation

CocoaPods

AppStoreManager is available on CocoaPods:

pod 'AppStoreManager'

Swift Package Manager

  • File > Swift Packages > Add Package Dependency
  • Add https://github.com/knottx/AppStoreManager.git
  • Select "Up to Next Major" with "1.3.3"

📝 How

Code Implementation

First:

import AppStoreManager

Show alert when update available, do something like this:

//  Can select version check type => .immediately, .daily, .weekly
AppStoreManager.shared.checkNewVersionAndShowAlert(.immediately, at: self, canSkip: true, preferredStyle: .alert)
//  If you don't need to show skip button, you can set the 'canSkip: false'
//  PreferredStyle default is '.alert', Can be select between '.alert' and '.actionSheet'

For handle when update available, do something like this:

//  Can select version check type => .immediately, .daily, .weekly
AppStoreManager.shared.checkNewVersion(.immediately) { (isAvailable) in
    if isAvailable {
        //  has new version available.
        AppStoreManager.shared.showAlertUpdate(at: self, canSkip: true, preferredStyle: .alert)
        //  If you don't need to show skip button, you can set the 'canSkip: false'
        //  PreferredStyle default is '.alert', Can be select between '.alert' and '.actionSheet'
    }else{
        //  no new version.
    }
}

For open AppStore, do something like this:

AppStoreManager.shared.openAppStore()
//  go to AppStore for update your Application

Customization

AppStoreManager

AppStoreManager supports the following:


AppStoreManager.shared.configureAlert(title: <String?>, message: <String?>)
//  Default title is "New version available"
//  Default message is "There is an update available. Please update to use this application.", message is optional.

AppStoreManager.shared.configureAlert(updateButtonTitle: <String?>, skipButtonTitle: <String?>)
//  Default updateButtonTitle is "Update"
//  Default skipButtonTitle is "Skip"

📋 Requirements

  • iOS 10.0+
  • Xcode 11+
  • Swift 5.1+

GitHub

link
Stars: 2
Last commit: 4 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1.3.3
15 weeks ago

1.3.3

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics