Detect the app version from AppStore and support Objective-C.
To run the example project, clone the repo, and run pod install
from the Example directory first.
AppStoreVersionDetector is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'AppStoreVersionDetector'
- 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.
AppStoreVersionDetector is available under the MIT license. See the LICENSE file for more info.