Hello, We are having an issue with the RequestReview API and were hoping to get some help. We know that there is no guarantee that the in-app review modal will show and we know that there are 3 circumstances in which it will definitely not appear:
- if the user has turned off in-app review/ratings in their settings
- if the user has submitted a review for that app on that device within the last 365 days
- if the user has been asked for a review >3 times in the last 365 days
When testing our implementation, every single one of our testers did not receive the rating modal despite the fact that we had all our testers turn on the app rating setting and that we have never asked for reviews from our app before. So that seems suspicious. While it is possible that something is up with our code (and I have provided some snippets below) we are also concerned that apple maybe is suppressing it for another reason. We really want to go live with our app review code but unfortunately we are not able to get confidence that it will ever appear for the user. Can you please help us understand why this isn't working.
The code: We are using the SwiftUI approach to requesting review. Here are some relevant code snippets
Important to note, we have a modal that appears when the user is in our list of active, targeted users. If they tap yes on this modal, it should show the in app rate the app system modal. If they tap no, we present them with an airship survey so that they can give feedback. Here is the code for the Yes button action:
@Environment(\.requestReview) private var requestReview
private var yesButton: some View {
Button(
action: {
dismiss()
requestReview()
},
label: {
Text(Lingua.General.appRateFirstButton)
.regularParagraph()
.frame(width: 180, height: 35)
}
)
.customButtonStyle(
foregroundColor: .black,
backgroundColor: Color(.powderBlue),
radius: 36
)
}
and this is the logic we use to determine whether we want to show them the modal in the first place. Obviously, a lot of this code leads to deeper areas in our logic and code but to give an idea...
private func showAppRateModalIfNeeded() {
if preferencesManager.appRateReviewShown == nil,
accountManager.userAccount?.permissions.rateTheApp == true {
let appReviewModalVC = UIHostingController(rootView: AppReviewModal())
appReviewModalVC.view.backgroundColor = .init(white: 0, alpha: 0.6)
appReviewModalVC.modalPresentationStyle = .overFullScreen
appReviewModalVC.modalTransitionStyle = .crossDissolve
parentVC?.navigationController?.present(appReviewModalVC, animated: true)
preferencesManager.appRateReviewShown = true
}
}
When testing in debug, we do find that the modal appears and works as expected. However, on release builds nobody is able to trigger it. Why? Are we doing something wrong here or is Apple just suppressing it. We are thinking about implementing the button taking the user directly into the app store review but we'd prefer to do the lower-friction dialog in-app if we can get it work so the user doesn't get sent out of the app.