...
링크를 통해 다운로드 받으세요.
Adapter file을 프로젝트에 넣어주세요.
Code Block | ||
---|---|---|
| ||
// ... import GFPSDK import AdSupport import AppTrackingTransparency import BuzzvilSDK @main class AppDelegate: UIResponder, UIApplicationDelegate { // ... func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { // initialize NAM GFPAdManager.setup(withPublisherCd: "YOUR_NAM_CODE", target: self) { error in if let error = error { // error } } // ... return true } } extension AppDelegate: GFPAdManagerDelegate { func attStatus() -> GFPATTAuthorizationStatus { if #available(iOS 14.5, *) { func convertATTrackingStatus(_ status: ATTrackingManager.AuthorizationStatus) -> GFPATTAuthorizationStatus { switch status { case .authorized: return .authorized case .denied: return .denied case .notDetermined: return .notDetermined case .restricted: return .restricted @unknown default: return .restricted } } return convertATTrackingStatus(ATTrackingManager.trackingAuthorizationStatus) } else { if ASIdentifierManager.shared().isAdvertisingTrackingEnabled { return .authorized } return .notDetermined } } } |