AppsFlyerSDK / AppsFlyerFramework

AppsFlyer Apple SDK
https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS
Other
164 stars 89 forks source link

Migration To V6 IDFA Support #158

Closed lone-necromancer closed 3 years ago

lone-necromancer commented 3 years ago

Hi. My name is aviv and I'm an iOS developer which is using your SDK product. I have a couple of questions regarding the migration to V6 which the documentation did not include.

does the function "waitForATTUserAuthorization(timeoutInterval: 60)" start counting when i call it, or when the app is launched or maybe when i call for "ATTrackingManager.requestTrackingAuthorization"?.

Does your SDK have a way to update the IDFA parameter manually after I receive it through the AdSupport framework?, i do not want to be dependent on a timer which I'm not sure what he's doing

andr-ggn commented 3 years ago

Hi

In order for the installation to be counted as non-organic by IDFA - the first calls of -[AppsFlyerLib start] must contain IDFA. Therefore, the -[AppsFlyerLib waitForATTUserAuthorizationWithTimeoutInterval:] option was added, which is able to postpone starts that were called before the developer receives a response from +[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:] and fill them(start calls) with the received IDFA.

– Timer starts from -[AppsFlyerLib waitForATTUserAuthorizationWithTimeoutInterval:] – You cannot set IDFA manually

As option you can remove -[AppsFlyerLib start] from -[AppDelegate applicationDidBecomeActive:] and call it from +[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:] callback, but then you have to manually control start calls. They do a lot for AppsFlyer: sessions/reattribution/reengagement..

lone-necromancer commented 3 years ago

Thank you very much

lone-necromancer commented 3 years ago

A small follow up question, if I log events before I call the "start" function. After i call the "start" function are they recorded, i did not see anything about it in the documentation but that's how it currently works for me. Is it intended to work this way?

andr-ggn commented 3 years ago

– Event will wait for start call automatically – You can read current IDFA value for SDK via public API: @property(nonatomic, strong, readonly) NSString *advertisingIdentifier;