티스토리 뷰

iOS 14 - AppTrackingTransparency framework 이슈 처리하기

너무 빡쳐서 적는 글

공식문서 - 사용자 개인정보 및 데이터 사용 - App Store - Apple Developer

iOS 14 등등 부터 AppTrackingTransparency 프레임워크(ATT)를 통해 사용자의 허가를 받아야만 사용자를 추적하거나 사용자 기기의 광고 식별자에 접근할 수 있게 정책이 추가되었다.

그래서 아래와 같은 상황이라면 허가를 받아야하는데,,

  • 타사 소유의 앱 및 웹사이트에서 수집한 사용자 데이터에 기반하여 앱에 맞춤형 광고를 표시하는 경우.
  • 데이터 브로커와 기기 위치 데이터 또는 이메일 목록을 공유하는 경우.
  • 이메일, 광고 ID 또는 기타 ID 목록을 타사 광고 네트워크와 공유하고 해당 정보를 다른 개발자의 앱에서 해당 사용자를 다시 대상으로 삼거나 유사 사용자를 찾는 데 사용하는 경우.
  • 이러한 목적으로 SDK를 사용하지 않더라도, 광고를 맞춤화하거나 광고 효율성을 측정하기 위해 앱의 사용자 데이터와 다른 개발자의 앱 사용자 데이터를 결합하는 타사 SDK를 앱에 배치하는 경우. 예를 들어 앱에서 수집하는 데이터의 용도를 변경하는 분석 SDK를 사용하여 다른 개발자의 앱에서 맞춤형 광고를 실행할 수 있습니다.

내 경우는, 현재 앱스토어 배포된 버전으로 Xcode 12에서 빌드할 때 문제가 없었다. 광고 모듈을 붙이지도 않았고, 근데 카카오 SDK를 V2로 마이그레이션하면서 사용중인 라이브러리를 전체 업데이트를 진행했는데 그때부터 ATT 프레임워크 관련 이슈가 발생했다.

  • 현재 사용중인 라이브러리 버전 (스압)

      Installing Alamofire 5.2.2 (was 4.9.1 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing Firebase 6.32.0 (was 6.27.0)
      Installing FirebaseABTesting 4.2.0 (was 3.3.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing FirebaseAnalytics 6.8.1 (was 6.6.1 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing FirebaseCore 6.10.2 (was 6.8.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing FirebaseCoreDiagnostics 1.7.0 (was 1.6.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing FirebaseCrashlytics 4.6.1 (was 4.6.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing FirebaseDynamicLinks 4.3.1 (was 4.3.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing FirebaseInstallations 1.7.0 (was 1.4.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing FirebasePerformance 3.3.0 (was 3.1.11 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing FirebaseRemoteConfig 4.9.0 (was 4.6.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing Flurry-iOS-SDK 11.0.0 (was 10.3.3)
      Installing GoogleAppMeasurement 6.8.1 (was 6.6.1 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing GoogleDataTransport 7.4.0 (was 7.3.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing GoogleTagManager 7.1.4 (was 7.1.3 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing GoogleUtilities 6.7.2 (was 6.6.0)
      Installing KakaoSDK (2.0.2)
      Installing KakaoSDKAuth (2.0.2)
      Installing KakaoSDKCommon (2.0.2)
      Installing KakaoSDKLink (2.0.2)
      Installing KakaoSDKNavi (2.0.2)
      Installing KakaoSDKStory (2.0.2)
      Installing KakaoSDKTalk (2.0.2)
      Installing KakaoSDKTemplate (2.0.2)
      Installing KakaoSDKUser (2.0.2)
      Installing PromisesObjC 1.2.10 (was 1.2.9 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing Protobuf 3.13.0 (was 3.12.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing Realm 5.3.6 (was 5.2.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing RealmSwift 5.3.6 (was 5.2.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing RxAlamofire 5.6.1 (was 5.1.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
      Installing nanopb 1.30906.0 (was 1.30905.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
    
      ---
      PODS:
        - Alamofire (5.2.2)
        - AppAuth (1.4.0):
          - AppAuth/Core (= 1.4.0)
          - AppAuth/ExternalUserAgent (= 1.4.0)
        - AppAuth/Core (1.4.0)
        - AppAuth/ExternalUserAgent (1.4.0)
        - Differentiator (4.0.1)
        - Firebase/Analytics (6.32.0):
          - Firebase/Core
        - Firebase/Core (6.32.0):
          - Firebase/CoreOnly
          - FirebaseAnalytics (= 6.8.1)
        - Firebase/CoreOnly (6.32.0):
          - FirebaseCore (= 6.10.2)
        - Firebase/Crashlytics (6.32.0):
          - Firebase/CoreOnly
          - FirebaseCrashlytics (~> 4.6.0)
        - Firebase/DynamicLinks (6.32.0):
          - Firebase/CoreOnly
          - FirebaseDynamicLinks (~> 4.3.0)
        - Firebase/Performance (6.32.0):
          - Firebase/CoreOnly
          - FirebasePerformance (~> 3.3.0)
        - Firebase/RemoteConfig (6.32.0):
          - Firebase/CoreOnly
          - FirebaseRemoteConfig (~> 4.9.0)
        - FirebaseABTesting (4.2.0):
          - FirebaseCore (~> 6.10)
        - FirebaseAnalytics (6.8.1):
          - FirebaseCore (~> 6.10)
          - FirebaseInstallations (~> 1.6)
          - GoogleAppMeasurement (= 6.8.1)
          - GoogleUtilities/AppDelegateSwizzler (~> 6.7)
          - GoogleUtilities/MethodSwizzler (~> 6.7)
          - GoogleUtilities/Network (~> 6.7)
          - "GoogleUtilities/NSData+zlib (~> 6.7)"
          - nanopb (~> 1.30906.0)
        - FirebaseCore (6.10.2):
          - FirebaseCoreDiagnostics (~> 1.6)
          - GoogleUtilities/Environment (~> 6.7)
          - GoogleUtilities/Logger (~> 6.7)
        - FirebaseCoreDiagnostics (1.7.0):
          - GoogleDataTransport (~> 7.4)
          - GoogleUtilities/Environment (~> 6.7)
          - GoogleUtilities/Logger (~> 6.7)
          - nanopb (~> 1.30906.0)
        - FirebaseCrashlytics (4.6.1):
          - FirebaseCore (~> 6.10)
          - FirebaseInstallations (~> 1.6)
          - GoogleDataTransport (~> 7.2)
          - nanopb (~> 1.30906.0)
          - PromisesObjC (~> 1.2)
        - FirebaseDynamicLinks (4.3.1):
          - FirebaseCore (~> 6.10)
        - FirebaseInstallations (1.7.0):
          - FirebaseCore (~> 6.10)
          - GoogleUtilities/Environment (~> 6.7)
          - GoogleUtilities/UserDefaults (~> 6.7)
          - PromisesObjC (~> 1.2)
        - FirebasePerformance (3.3.0):
          - FirebaseCore (~> 6.9)
          - FirebaseInstallations (~> 1.5)
          - FirebaseRemoteConfig (~> 4.7)
          - GoogleDataTransport (~> 7.0)
          - GoogleToolboxForMac/Logger (~> 2.1)
          - "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
          - GoogleUtilities/Environment (~> 6.2)
          - GoogleUtilities/ISASwizzler (~> 6.2)
          - GoogleUtilities/MethodSwizzler (~> 6.2)
          - GTMSessionFetcher/Core (~> 1.1)
          - Protobuf (~> 3.12)
        - FirebaseRemoteConfig (4.9.0):
          - FirebaseABTesting (~> 4.2)
          - FirebaseCore (~> 6.10)
          - FirebaseInstallations (~> 1.6)
          - GoogleUtilities/Environment (~> 6.7)
          - "GoogleUtilities/NSData+zlib (~> 6.7)"
        - Flurry-iOS-SDK/FlurrySDK (11.0.0)
        - GoogleAnalytics (3.17.0)
        - GoogleAppMeasurement (6.8.1):
          - GoogleUtilities/AppDelegateSwizzler (~> 6.7)
          - GoogleUtilities/MethodSwizzler (~> 6.7)
          - GoogleUtilities/Network (~> 6.7)
          - "GoogleUtilities/NSData+zlib (~> 6.7)"
          - nanopb (~> 1.30906.0)
        - GoogleDataTransport (7.4.0):
          - nanopb (~> 1.30906.0)
        - GoogleSignIn (5.0.2):
          - AppAuth (~> 1.2)
          - GTMAppAuth (~> 1.0)
          - GTMSessionFetcher/Core (~> 1.1)
        - GoogleSymbolUtilities (1.1.2)
        - GoogleTagManager (7.1.4):
          - FirebaseAnalytics (~> 6.7)
          - GoogleAnalytics (~> 3.17)
          - GoogleUtilitiesLegacy (~> 1.3)
        - GoogleToolboxForMac/Defines (2.2.2)
        - GoogleToolboxForMac/Logger (2.2.2):
          - GoogleToolboxForMac/Defines (= 2.2.2)
        - "GoogleToolboxForMac/NSData+zlib (2.2.2)":
          - GoogleToolboxForMac/Defines (= 2.2.2)
        - GoogleUtilities/AppDelegateSwizzler (6.7.2):
          - GoogleUtilities/Environment
          - GoogleUtilities/Logger
          - GoogleUtilities/Network
        - GoogleUtilities/Environment (6.7.2):
          - PromisesObjC (~> 1.2)
        - GoogleUtilities/ISASwizzler (6.7.2)
        - GoogleUtilities/Logger (6.7.2):
          - GoogleUtilities/Environment
        - GoogleUtilities/MethodSwizzler (6.7.2):
          - GoogleUtilities/Logger
        - GoogleUtilities/Network (6.7.2):
          - GoogleUtilities/Logger
          - "GoogleUtilities/NSData+zlib"
          - GoogleUtilities/Reachability
        - "GoogleUtilities/NSData+zlib (6.7.2)"
        - GoogleUtilities/Reachability (6.7.2):
          - GoogleUtilities/Logger
        - GoogleUtilities/UserDefaults (6.7.2):
          - GoogleUtilities/Logger
        - GoogleUtilitiesLegacy (1.3.2):
          - GoogleSymbolUtilities (~> 1.1)
        - GTMAppAuth (1.0.0):
          - AppAuth/Core (~> 1.0)
          - GTMSessionFetcher (~> 1.1)
        - GTMSessionFetcher (1.4.0):
          - GTMSessionFetcher/Full (= 1.4.0)
        - GTMSessionFetcher/Core (1.4.0)
        - GTMSessionFetcher/Full (1.4.0):
          - GTMSessionFetcher/Core (= 1.4.0)
        - KakaoSDKAuth (2.0.2):
          - KakaoSDKCommon (= 2.0.2)
        - KakaoSDKCommon (2.0.2):
          - Alamofire (~> 5.1)
        - KakaoSDKLink (2.0.2):
          - KakaoSDKCommon (= 2.0.2)
          - KakaoSDKTemplate (= 2.0.2)
        - KakaoSDKNavi (2.0.2):
          - KakaoSDKCommon (= 2.0.2)
        - KakaoSDKStory (2.0.2):
          - KakaoSDKAuth (= 2.0.2)
          - KakaoSDKCommon (= 2.0.2)
        - KakaoSDKTalk (2.0.2):
          - KakaoSDKAuth (= 2.0.2)
          - KakaoSDKCommon (= 2.0.2)
          - KakaoSDKTemplate (= 2.0.2)
        - KakaoSDKTemplate (2.0.2):
          - KakaoSDKCommon (= 2.0.2)
        - KakaoSDKUser (2.0.2):
          - KakaoSDKAuth (= 2.0.2)
          - KakaoSDKCommon (= 2.0.2)
        - KeychainSwift (19.0.0)
        - MBProgressHUD (1.2.0)
        - nanopb (1.30906.0):
          - nanopb/decode (= 1.30906.0)
          - nanopb/encode (= 1.30906.0)
        - nanopb/decode (1.30906.0)
        - nanopb/encode (1.30906.0)
        - naveridlogin-sdk-ios (4.1.2)
        - PromisesObjC (1.2.10)
        - Protobuf (3.13.0)
        - ReactorKit (2.1.0):
          - RxSwift (~> 5.0)
          - WeakMapTable (~> 1.1)
        - Realm (5.3.6):
          - Realm/Headers (= 5.3.6)
        - Realm/Headers (5.3.6)
        - RealmSwift (5.3.6):
          - Realm (= 5.3.6)
        - RxAlamofire (5.6.1):
          - RxAlamofire/Core (= 5.6.1)
        - RxAlamofire/Core (5.6.1):
          - Alamofire (~> 5.2)
          - RxSwift (~> 5.1)
        - RxCocoa (5.1.1):
          - RxRelay (~> 5)
          - RxSwift (~> 5)
        - RxDataSources (4.0.1):
          - Differentiator (~> 4.0)
          - RxCocoa (~> 5.0)
          - RxSwift (~> 5.0)
        - RxKakaoSDK (2.0.2):
          - KakaoSDKNavi (= 2.0.2)
          - KakaoSDKTemplate (= 2.0.2)
          - RxKakaoSDKAuth (= 2.0.2)
          - RxKakaoSDKCommon (= 2.0.2)
          - RxKakaoSDKLink (= 2.0.2)
          - RxKakaoSDKStory (= 2.0.2)
          - RxKakaoSDKTalk (= 2.0.2)
          - RxKakaoSDKUser (= 2.0.2)
        - RxKakaoSDKAuth (2.0.2):
          - KakaoSDKAuth (= 2.0.2)
          - RxKakaoSDKCommon (= 2.0.2)
        - RxKakaoSDKCommon (2.0.2):
          - KakaoSDKCommon (= 2.0.2)
          - RxAlamofire (~> 5.2)
          - RxCocoa
          - RxSwift
        - RxKakaoSDKLink (2.0.2):
          - KakaoSDKLink (= 2.0.2)
          - KakaoSDKTemplate (= 2.0.2)
          - RxKakaoSDKCommon (= 2.0.2)
        - RxKakaoSDKStory (2.0.2):
          - KakaoSDKStory (= 2.0.2)
          - RxKakaoSDKAuth (= 2.0.2)
          - RxKakaoSDKCommon (= 2.0.2)
        - RxKakaoSDKTalk (2.0.2):
          - KakaoSDKTalk (= 2.0.2)
          - KakaoSDKTemplate (= 2.0.2)
          - RxKakaoSDKAuth (= 2.0.2)
          - RxKakaoSDKCommon (= 2.0.2)
        - RxKakaoSDKUser (2.0.2):
          - KakaoSDKUser (= 2.0.2)
          - RxKakaoSDKAuth (= 2.0.2)
          - RxKakaoSDKCommon (= 2.0.2)
        - RxRelay (5.1.1):
          - RxSwift (~> 5)
        - RxSwift (5.1.1)
        - WeakMapTable (1.1.0)

이것들 중에서 어딘가에서 IDFA를 쓴다는거고,, 그래서 에러가 난다는건데.. 분석툴인 Flurry는 IDFA가 아닌 IDFV(공급 업체 식별자)를 기반으로 하기 때문에 iOS 14를 준수하고 있다고 하고 Firebase는.. 이 이슈를 참고하면 될 거 같다. https://github.com/firebase/firebase-ios-sdk/issues/5928

내가 받은 이슈는 두 가지다. 2번이 제일 속을 썩였다.

이슈 1

iOS 14에서 빌드할 때 AppTrackingTransparency.framework is not linked with 'Target' 오류

  • 이 오류는 말 그대로 Target에 ATT 프레임워크를 찾을 수 없다는 거다.
  • Target > General > Frameworks, Libraries, and Embedded Content 에 AppTrackingTransparency.framework를 추가한다.

이슈2

1번 설정한 후 iOS 13에서 빌드할 때 오류 (dyld: Library not loaded)

dyld: Library not loaded: /System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency
  Referenced from: /private/var/containers/Bundle/Application/QWE/ABC.app
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
(lldb)
  • 이상하게 1번을 설정한 상태에서 13에서 빌드하면 이런 이상한 에러가 난다.
  • Target > Build Phases > Link Binary With Libraries에 추가되어있는 ATT framework의 status를 Optional 로 변경한다. (참고 - https://penggu.tistory.com/97)

  • 내 생각엔 ATT 프레임워크가 iOS 14부터 사용가능하고 (https://developer.apple.com/documentation/apptrackingtransparency) 13에서는 사용할 수 없어 이런 오류가 발생하는 거로 생각된다. 그래서 Status를 선택으로 바꾸니 오류가 안나는 거 같은데 이건 내 추측일 뿐 정확하진 않다.

두 개 이슈를 해결하였다. ATT 너무 싫다.

참고로 ATT는 내년 상반기에 적용하도록 할 예정이라고 한다.

도움이 되셨다면.. Buy me a coffeeBuy me a coffee
댓글
댓글쓰기 폼