TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Review Request once a year

Forums > SwiftUI

Hi everybody,

in my app, I have a Request Review with StoreKit and a counter stored in UserDefaults. Now I'm thinking for my app it would be the best to have not a counter and having the users get every 15th presented the Request Review, but to have it only once a year.

Any ideas how to programm that in my RequestReview File? It should be presented once you enter this page which calls the AppReview File and then only once a year.

Thanks for Ideas!

static func requestReview() {
    var count = UserDefaults.standard.integer(forKey: UserDefaultsKeys.appStartUpsCountKey)
    count += 1
    UserDefaults.standard.set(count, forKey: UserDefaultsKeys.appStartUpsCountKey)

    if count.isMultiple(of: 4){
        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 2.0) {
            if let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene {
                SKStoreReviewController.requestReview(in: scene)
            }
        }
    }
}

3      

You can NOT requestReview at a time this will be down to Apple Review request deciding the best thing is to have your requestReview after a user has used the app a few times BEFORE it ask (it will only happen once anyway if user has tapped the stars)

So you better off keeping track of say how many time the user has opened the app.

PS if you running in simluator then it happens ever time but it only for testing!

You can have a button so a user can tap for to WRITE a REVIEW

UIApplication.shared.open(URL(string: "https://apps.apple.com/app/id1465159349?action=write-review")!, options: [:], completionHandler: nil)

3      

Thanks for the nice reply.

I know Apples instruction about RequestReview.

But you don't know my App.

I have about 20 pages, which the user has to work on.

If the user reaches Page 15, he has worked with the App a lot of time. This would be the right point to ask for a review.

But if he comes back, it is not necessary to aks again for a request. Maybe a year later or so.

Greets!

3      

I think you misunderstood me. It great that you wait to ask for a review.

Have a look at the flow chart

Flow Chart

if you request waits a year then it still may not be shown as there is no gaurantee that requestReview will show a review window, and you do not get anything back from the review to say if user has even been shown a review window

3      

Hacking with Swift is sponsored by Blaze.

SPONSORED Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!

Reserve your spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.