Giter Site home page Giter Site logo

knottx / appstoremanager Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 4.0 60 KB

A new version checking framework for iOS. available on CocoaPods.

Home Page: https://cocoapods.org/pods/AppStoreManager

License: MIT License

Ruby 5.12% Swift 94.88%
swift ios-swift cocoapods appstore update-checker new-version pod framework versionchecker

appstoremanager's Introduction

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.6"

๐Ÿ“ How

Code Implementation

First:

import AppStoreManager

Check New Version Available:

  • Can select version check type => .immediately, .daily, .weekly

    AppStoreManager.shared.checkNewVersion(.immediately) { (isAvailable) in
        if isAvailable {
            //  New Version Available.
        } else {
            //  No New Version.
        }
    }
  • If your app is only available outside the U.S. App Store, you will need to set countryCode to the two-letter country code of the store you want to search.

    See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a list of ISO Country Codes.

    AppStoreManager.shared.checkNewVersion(.immediately, countryCode: "th") { (isAvailable) in
        if isAvailable {
            //  New Version Available.
        } else {
            //  No New Version.
        }
    }

Check New Version Available and Show Alert:

  • Can select version check type => .immediately, .daily, .weekly

  • If you don't need to show skip button, you can set the canSkip: false

    AppStoreManager.shared.checkNewVersionAndShowAlert(.immediately, at: self, canSkip: true)
  • If your app is only available outside the U.S. App Store, you will need to set countryCode to the two-letter country code of the store you want to search.

    See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a list of ISO Country Codes.

    AppStoreManager.shared.checkNewVersionAndShowAlert(.immediately, countryCode: "th", at: self, canSkip: true)

Open AppStore:

```swift
AppStoreManager.shared.openAppStore()
```
  • If your app is only available outside the U.S. App Store, you will need to set countryCode to the two-letter country code of the store you want to search.

    See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a list of ISO Country Codes.

    AppStoreManager.shared.openAppStore(countryCode: "th")

Alert Open AppStore:

  • 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

    AppStoreManager.shared.showAlertUpdate(at: self, canSkip: true)
  • If your app is only available outside the U.S. App Store, you will need to set countryCode to the two-letter country code of the store you want to search.

    See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a list of ISO Country Codes.

    AppStoreManager.shared.showAlertUpdate(countryCode: "th",at: self, canSkip: true)

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 11.0+
  • Xcode 11+
  • Swift 5.1+

appstoremanager's People

Contributors

itthisakp avatar knottx avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.