Closed DanilAtyukov-dev closed 3 months ago
6.15.1 added with SPM
6.15.1
class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
AppsFlyerLib.shared().appsFlyerDevKey = "****" AppsFlyerLib.shared().appleAppID = "****" AppsFlyerLib.shared().isDebug = true NotificationCenter.default.addObserver(self, selector: NSSelectorFromString("sendLaunch"), name: UIApplication.didBecomeActiveNotification, object: nil) return true } @objc func sendLaunch() { AppsFlyerLib.shared().start() }
}
var ConversionData: [AnyHashable: Any]? = nil extension AppDelegate: AppsFlyerLibDelegate {
func onConversionDataSuccess(_ data: [AnyHashable: Any]) { ConversionData = data print("af success") } func onConversionDataFail(_ error: any Error) { print("af fail") }
calling the onConversionDataSuccess function or onConversionDataFail
you must set the delegate for the conversion data: AppsFlyerLib.shared().delegate = self
AppsFlyerLib.shared().delegate = self
Report
SDK Version
6.15.1
added with SPMWhat did you do?
class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
}
var ConversionData: [AnyHashable: Any]? = nil extension AppDelegate: AppsFlyerLibDelegate {
}
What did you expect to happen?
calling the onConversionDataSuccess function or onConversionDataFail
What happened instead?