Exemple #1
0
        public static void Init(String branchKey, NSDictionary launchOptions, IBranchBUOSessionInterface callback)
        {
            if (instance != null)
            {
                return;
            }

            if (!branchKey.StartsWith("key_", StringComparison.Ordinal))
            {
                Console.WriteLine("Usage of App Key is deprecated, please move toward using a Branch key");
            }

            instance = new BranchIOS();
            Branch.branchInstance = instance;
            instance.branchKey    = branchKey;

            if (launchOptions != null)
            {
                instance.launchOptions = new NSDictionary(launchOptions);
            }
            else
            {
                instance.launchOptions = new NSDictionary();
            }

            if (Debug || Runtime.Arch == Arch.SIMULATOR)
            {
                instance.SetDebug();
            }

            instance.InitSession(callback);
        }
Exemple #2
0
        public static void Init(String branchKey, NSDictionary launchOptions, IBranchSessionInterface callback)
        {
            if (instance != null)
            {
                return;
            }

            if (!branchKey.StartsWith("key_", StringComparison.Ordinal))
            {
                Console.WriteLine("Usage of App Key is deprecated, please move toward using a Branch key");
            }

            instance = new BranchIOS();
            Branch.branchInstance = instance;
            instance.branchKey    = branchKey;

            instance.NativeBranch.RegisterPluginName("Xamarin", "7.0.7");
            //IOSNativeBranch.RegisterPluginName();

            if (launchOptions != null)
            {
                instance.launchOptions = new NSDictionary(launchOptions);
            }
            else
            {
                instance.launchOptions = new NSDictionary();
            }

            if (Debug || Runtime.Arch == Arch.SIMULATOR)
            {
                instance.SetDebug();
            }

            if (delayInitToCheckForSearchAds)
            {
                instance.NativeBranch.DelayInitToCheckForSearchAds();
            }

            if (useLongerWaitForAppleSearchAds)
            {
                instance.NativeBranch.UseLongerWaitForAppleSearchAds();
            }

            if (ignoreAppleSearchAdsTestData)
            {
                instance.NativeBranch.IgnoreAppleSearchAdsTestData();
            }

            //instance.NativeBranch.EnableLogging();

            instance.InitSession(callback);
        }