AppleTree iOS

[Swift] App Store 리뷰 요청하기 초간단 정리 - AppleTree iOS 본문

Swift

[Swift] App Store 리뷰 요청하기 초간단 정리 - AppleTree iOS

사과나무 2022. 1. 5. 09:53

별점 작업을 위해 리뷰를 요청을 해야하는 경우가 있습니다.

이경우 2가지 방법이 있습니다.

 

  1. SKStoreReviewController를 사용해서 요청하기
  1. URL로 요청하기 (앱스토어로 이동)

 

특징

2가지 방법은 아래와 같은 특징이 있습니다.

SKStoreReviewController로 요청 URL로 요청
요청이 간단하다. 함수를 호출한다고 항상 리뷰창이 뜬다고 보장할 수 없다. 1년 최대 3번 요청할 수 있다. → 디버그 모드의 경우: 매번 리뷰 요청 창이 뜸 → TestFlight: 리뷰 요청 창이 안뜸 URL을 통해서 실행시킬 수 있다. 항상 뜨게 할 수 있다. 앱스토어로 화면이 이동된다. 코멘트를 바로 적을 수 있다.

 

1. SKStoreReviewController를 사용해서 요청하기

애플 공식 문서

Apple Developer Documentation
https://developer.apple.com/documentation/storekit/requesting_app_store_reviews

 

import StoreKit  ... func requestRating() { 		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()     } }

 

2. URL을 통해 요청(앱스토어로 이동)

func requestReviewmenually(id: String) { //app store connect의 앱정보에서 apple id를 확인한다 		guard  				let writeReviewURL = URL(string: "https://apps.apple.com/app/id\(id)?action=write-review")     else { return }     UIApplication.shared.open(writeReviewURL, options: [:], completionHandler: nil) }

 

리뷰요청 이미지1
리뷰요청 이미지1
리뷰요청 이미지3

'Swift' 카테고리의 다른 글

[Swift] App Store 리뷰 요청하기 초간단 정리 - AppleTree iOS  (0) 2022.01.04
Comments