Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Today we are going to learn about Sk Store Review Controller.
Sk Store Review Controller is Apple way to request review and rating inside iOS app.
Usually, we use a custom UIView with star images in the app then ratings are recorded in the backend. However, when it comes to app store review, the user generally says “Not now” option because the user wants to come out from the current app’s screen to Apple App store page.
We miss the feedback because of this behaviour.
Implementation
Step – 1:
Create a class for SKStoreReviewController related checks, imports and methods.
import StoreKitclass Review {}
Step – 2:
My logic for showing the review view is based on the number of app launches done by a given user. The number of launches will be store in NSUserDefaults.
let launchCount = “noOfLaunches” // userdefault key to store the number of launching
Step – 3:
To decide whether to show the review view.
func isReviewViewDisplay(minLaunchCount:Int) -> Bool {let launchcount = UserDefaults.standard.integer(forKey: launchCount)if launchcount >= minLaunchCount {return true} else {UserDefaults.standard.set((launchcount + 1), forKey: launchCount)}return false}
launchcount
Step – 4:
To call the ‘showReview’ method from any view controller of the app.
func showReview(afterMinLaunchCount:Int){if(self.isReviewViewDisplay(minLaunchCount: afterMiniLaunchCount)){SKStoreReviewController.requestReview()}}
isReviewViewDisplay
Step – 5 :
Now you can call “showReview” like this:
if #available(iOS 10.3, *) {Review().showReview(afterMinLaunchCount: 2)}else{}
Minimum number of launches is the int value we set to the number of launch counts.
In conclusion, we have learned about Sk Store Review Controller
Lastly, please share your queries and thoughts below.
For more blogs please click here
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.