AppStoreManager is a new version checking framework for iOS.
AppStoreManager
is available on CocoaPods:
pod 'AppStoreManager'
https://github.com/knottx/AppStoreManager.git
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
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"
link |
Stars: 2 |
Last commit: 4 days ago |
1.3.3
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics