Using the below code i can ask the user to rate the app on the app store
if #available(iOS 10.3, *) {
SKStoreReviewController.requestReview()
} els
There is no way to achieve that. But if you get a little bit creative you can at least get an idea whether the user is going to leave a rating or not.
For example you could put the requestReview() inside an UIAletController, asking the user "do you want to rate?", if the tap no there is no point calling the requestReview(), but if the tap yes then the likelihood is that they will rate so call requestReview().
Of course this is not the best UX as you are essentially asking the same thing twice, but you can't have it both ways... Hope it helps.