티스토리 뷰
어느 날, 단순히 앱 설명과 일부 스크린샷을 바꿨는데 앱 검수를 통과하지 못했다. 또 뭐가 잘못되었을까 하고 봤더니 App Tracking Transparency 관련 팝업이 뜨지 않아서라고 한다. 정말 소스한 줄 고치지 않은 앱을 버전만 바꿔서 제출했는데 이러긴가 싶었다.
그런데 iOS15가 되면서 살짝 바꼈나 보다. 앱이 완전히 Active가 된 상태여야 한다고.
팝업 띄우기 위해 체크하던 부분 소스 위치를 살짝 바꿔서 해결했다.
func applicationDidBecomeActive(_ application: UIApplication) {
requestPermission()
}
func requestPermission() {
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization { status in
switch status {
case .authorized:
// Tracking authorization dialog was shown
// and we are authorized print("Authorized")
// Now that we are authorized we can get the IDFA
print(ASIdentifierManager.shared().advertisingIdentifier)
Analytics.setAnalyticsCollectionEnabled(true)
case .denied:
// Tracking authorization dialog was
// shown and permission is denied
print("Denied")
Analytics.setAnalyticsCollectionEnabled(false)
case .notDetermined:
// Tracking authorization dialog has not been shown
print("Not determined")
case .restricted:
print("Restricted")
@unknown default: print("Unknown")
}
}
} else {
// Fallback on earlier versions
}
}
https://help.dfinery.io/hc/ko/articles/4406499579417-iOS-15-업데이트-대응-안내
'하는 일' 카테고리의 다른 글
S3에 파일이 있는지 없는지 확인하는 방법 How to check a file is in AWS S3. (0) | 2021.06.20 |
---|
댓글