Skip to content

chenxing640/AppStoreVersionDetector

Repository files navigation

AppStoreVersionDetector

Detect the app version from AppStore and support Objective-C.

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

AppStoreVersionDetector is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'AppStoreVersionDetector'

Usage

  • Detect the app version
AppStoreVDetector.default.onDetect(id: "15674646463", delayToExecute: 5) { result in
    switch result {
    case .success(let hasNewVersion, let response):
        print("hasNewVersion: \(hasNewVersion), response: \(response ?? [:])")
        break
    case .failure(let message):
        print("message: \(message)")
        break
    }
}
  • Go to AppStore
AppStoreVDetector.default.toAppStore(withAppId: "15674646463")
  • Go AppStore to write the review.
AppStoreVDetector.default.toWriteReview(withAppId: "15674646463")

To learn the usage in Objective-C, please view the file(VersionDetectObjcInvokeSample.m) in this project.

Author

chenxing, chenxing640@foxmail.com

License

AppStoreVersionDetector is available under the MIT license. See the LICENSE file for more info.