@@ -31,13 +34,23 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
...
@@ -31,13 +34,23 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
self.window=UIWindow(frame:UIScreen.main.bounds)
self.window=UIWindow(frame:UIScreen.main.bounds)
appsFlyerLog.info("AppsFlyer initialize with AppsFlyerId: \(kAppsFlyerId), Apple App ID: \(kAppsFlyerAppId)")
appsFlyer.appsFlyerDevKey=kAppsFlyerId
appsFlyer.appleAppID=kAppsFlyerAppId
appsFlyer.delegate=self
#if DEBUG
appsFlyer.isDebug=true
#else
appsFlyer.isDebug=false
#endif
// Note that the Amazon SDK will get assigned a proper value for consent status inside CCPAHelper.onAppLaunch
// Note that the Amazon SDK will get assigned a proper value for consent status inside CCPAHelper.onAppLaunch
// So, make sure this call happens after the
// So, make sure this call happens after the
CCPAHelper.shared.onAppLaunch()
CCPAHelper.shared.onAppLaunch()
// As of DTB 3.4.6 the Amazon SDK freezes the main thread on startup for a couple of seconds, which got us rejected during an AppStore Review. We're going to move this initialization to the AppDelegate for now. The consent status is going to be set earlier within CCPAHelper.shared.onAppLaunch(), so make sure CCPAHelper's onAppLaunch is called before Amazon's setAppKey
// As of DTB 3.4.6 the Amazon SDK freezes the main thread on startup for a couple of seconds, which got us rejected during an AppStore Review. We're going to move this initialization to the AppDelegate for now. The consent status is going to be set earlier within CCPAHelper.shared.onAppLaunch(), so make sure CCPAHelper's onAppLaunch is called before Amazon's setAppKey
// TODO: remove setAppKey from here, if Amazon has fixed the freeze on startup.
// TODO: remove setAppKey from here, if Amazon has fixed the freeze on startup.
appsFlyerLog.info("This is a non-organic install. Media source: \(sourceID??String(describing:conversionInfo["media_source"])) Campaign: \(campaign??String(describing:conversionInfo["campaign"]))")
}
elseifstatus=="Organic"{
appsFlyerLog.info("This is an organic install.")
}
}
funconConversionDataFail(_error:Error){
appsFlyerLog.error("conversion data fail: \(error)")