A Swift 5.6 implementation of iTunes customer reviews. Retrieve customer reviews for your app and display most helpful reviews.
You can use The Swift Package Manager to install AppStoreReviewsAPI by adding it to your Package.swift file:
import PackageDescription
let package = Package(
name: "MyApp",
targets: [],
dependencies: [
.Package(url: "https://github.com/ihamadfuad/AppStoreReviewsAPI.git", .from: "1.0.0")
]
)
import AppStoreReviewsAPI
let appStore = AppStoreReviewsAPI(appID: "310633997") // This app id belongs to WhatsApp
let reviews = try await appStore.reviews()
reviews.feed.entry.forEach {
print("Rating: ", $0.imRating.label)
print($0.title.label)
print($0.content.label)
print(" +---------------------------------------------------+ ")
}