if #available(iOS 14.0, *) {
if let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene {
SKStoreReviewController.requestReview(in: scene)
}
} else if #available(iOS 10.3, *){
SKStoreReviewController.requestReview()
}
주의사항은 호출한다고 매번 프롬프트가 뜨는건 아니고 일년에 최대 3번 나온다고 한다.
이 주의사항이 마음에 안든다면 옛날 방법으로 앱스토어로 넘겨 알아서 리뷰를 남기도록 할 수 있다.
let url = URL(string: "itms-apps://itunes.apple.com/app/idxxxxxxxxxxx")!
UIApplication.shared.open(url)
더 자세한 내용은
developer.apple.com/documentation/storekit/skstorereviewcontroller/requesting_app_store_reviews
Apple Developer Documentation
developer.apple.com
'개발 > iOS' 카테고리의 다른 글
Apple Design Resources (0) | 2021.12.02 |
---|---|
iOS UIViewController를 스와이프로 닫지 못하도록 하려면 (0) | 2021.03.01 |
iOS 앱에서 다크모드 비활성화 (0) | 2021.02.27 |
댓글