xamarin-branch-deep-linking-attribution icon indicating copy to clipboard operation
xamarin-branch-deep-linking-attribution copied to clipboard

'BranchIOS' does not contain a definition for 'UseLongerWaitForAppleSearchAds'

Open williamt-ifit opened this issue 5 years ago • 1 comments
trafficstars

I am working to integrate tracking Apple Search Ads with Branch in a Xamarin.iOS app (not Xamarin Forms). In the AppDelegate.cs, I have the following initialization logic at the top of the FinishedLaunching override:

BranchIOS.Debug = false;
BranchIOS.DelayInitToCheckForSearchAds ();
BranchIOS.Init (BranchSDKKey, launchOptions, this);

However, in the Branch SDK documentation article for integrating Apple Search Ads tracking, the Swift example code indicates two other methods that should be called prior to Init:

// This will usually add less than 1 second on first time startup.  Up to 3.5 seconds if Apple Search Ads fails to respond.
branch.delayInitToCheckForSearchAds()

// Increases the amount of time the SDK waits for Apple Search Ads to respond. The default wait has a better than 90% success rate, however waiting longer can improve the success rate. This will increase the usual delay to about 3 seconds on first time startup.  Up to about 15 seconds if Apple Search Ads fails to respond.
branch.useLongerWaitForAppleSearchAds()

// Branch won't callback with Apple's test data, this is still sent to the server.
branch.ignoreAppleSearchAdsTestData()
branch.initSession(launchOptions: launchOptions, andRegisterDeepLinkHandler: { (params, error) in
    // handle payload
    })

That code leads me to believe that I should also be calling something along the lines of BranchIOS.UseLongerWaitForAppleSearchAds () and BranchIOS.IgnoreAppleSearchAdsTestData () before calling the Init method.

I can see in the iOS ApiDefinition there are binding methods set up for those two methods, so it does appear that the native Branch client supports those: https://github.com/BranchMetrics/xamarin-branch-deep-linking-attribution/blob/master/Branch-Xamarin-Lib.iOS/ApiDefinition.cs#L3438

However, nothing in the publicly-exposed BranchIOS class seems to connect to those. Are there any plans to implement those methods similar to the DelayInitToCheckForSearchAds method?

williamt-ifit avatar Apr 20 '20 18:04 williamt-ifit

There's a backlogged ticket for exposing this API in Xamarin.

echo-branch avatar May 06 '20 21:05 echo-branch