I have been integrating the Branch SDK into my Unity iOS app and everything worked fine.
Now I am having some issues having the analytics page include the Apple Search Ads. I read the docs (https://docs.branch.io/deep-linked-ads/apple-mobile-tracking/) but I couldn't find anything specifically for Unity.
I tried matching the suggested functions and here is all I could manage to "port":
using UnityEngine;
public class BranchManager : MonoBehaviour
{
void Start()
{
Branch.delayInitToCheckForSearchAds();
Branch.initSession(CallbackWithBranchUniversalObject);
}
void CallbackWithBranchUniversalObject(BranchUniversalObject buo, BranchLinkProperties linkProps, string error)
{
if (error != null)
{
System.Console.WriteLine("Error : " + error);
}
else if (linkProps.controlParams.Count > 0)
{
System.Console.WriteLine("Deeplink params : "
+ buo.ToJsonString()
+ linkProps.ToJsonString());
}
}
}
Is this enough to retrieve the Attribution properly?
Without the delayInitToCheckForSearchAds it didn't work, so I am not sure.
Also, not sure if this matters, but I have already my own plugin natively handling the Apple Attribution (to track on MixPanel).
Thanks in advance for the help! :)