Ejemplo n.º 1
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            #if USE_APPCENTER
            Microsoft.AppCenter.AppCenter.Start(
                "{TOGGL_APP_CENTER_ID_IOS}",
                typeof(Microsoft.AppCenter.Crashes.Crashes),
                typeof(Microsoft.AppCenter.Analytics.Analytics));
            #endif
            #if USE_ANALYTICS
            Firebase.Core.App.Configure();
            Google.SignIn.SignIn.SharedInstance.ClientID =
                Firebase.Core.App.DefaultInstance.Options.ClientId;
            Adjust.AppDidLaunch(ADJConfig.ConfigWithAppToken("{TOGGL_ADJUST_APP_TOKEN}", AdjustConfig.EnvironmentProduction));
            #endif

            base.FinishedLaunching(application, launchOptions);

            UNUserNotificationCenter.Current.Delegate = this;

            #if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
            #endif

            return(true);
        }
Ejemplo n.º 2
0
        private void initializeAnalytics()
        {
#if USE_APPCENTER
            Microsoft.AppCenter.AppCenter.Start(
                "{TOGGL_APP_CENTER_ID_IOS}",
                typeof(Microsoft.AppCenter.Crashes.Crashes),
                typeof(Microsoft.AppCenter.Analytics.Analytics));
#endif
#if USE_ANALYTICS
            Google.SignIn.SignIn.SharedInstance.ClientID =
                Firebase.Core.App.DefaultInstance.Options.ClientId;
            Adjust.AppDidLaunch(ADJConfig.ConfigWithAppToken("{TOGGL_ADJUST_APP_TOKEN}", AdjustConfig.EnvironmentProduction));
#endif
        }
Ejemplo n.º 3
0
        private void Start()
        {
            Config();

            var configNumber = 0;

            if (Command.ContainsParameter("configName"))
            {
                var configName = Command.GetFirstParameterValue("configName");
                configNumber = int.Parse(configName.Substring(configName.Length - 1));
            }

            var adjustConfig = _savedConfigs[configNumber];

            Adjust.AppDidLaunch(adjustConfig);
            _savedConfigs.Remove(0);
        }
Ejemplo n.º 4
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Configure AdjustDelegate object.
            adjustDelegate = new AdjustDelegateXamarin();

            // Configure adjust.
            string yourAppToken = "2fm9gkqubvpc";
            string environment  = AdjustConfig.EnvironmentSandbox;

            var config = ADJConfig.ConfigWithAppToken(yourAppToken, environment);

            // var config = ADJConfig.ConfigWithAppToken(yourAppToken, environment, true);

            // Change the log level.
            config.LogLevel = ADJLogLevel.Verbose;
            // config.LogLevel = ADJLogLevel.Suppress;

            // Enable event buffering.
            // config.EventBufferingEnabled = true;

            // Enable background tracking.
            config.SendInBackground = true;

            // Set default tracker.
            // config.DefaultTracker = "{TrackerToken}";

            // Set an attribution delegate.
            config.Delegate = adjustDelegate;

            // Add session callback parameters.
            Adjust.AddSessionCallbackParameter("scp_foo", "scp_bar");
            Adjust.AddSessionCallbackParameter("scp_key", "scp_value");

            // Remove session callback parameters.
            Adjust.RemoveSessionCallbackParameter("scp_foo");
            Adjust.RemoveSessionCallbackParameter("scp_key");

            // Add session partner parameters.
            Adjust.AddSessionPartnerParameter("spp_a", "spp_b");
            Adjust.AddSessionPartnerParameter("spp_x", "spp_y");

            // Remove session partner parameters.
            Adjust.RemoveSessionPartnerParameter("scp_a");
            Adjust.RemoveSessionPartnerParameter("scp_x");

            // Clear all session callback parameters.
            // Adjust.ResetSessionCallbackParameters();

            // Clear all session partner parameters.
            // Adjust.ResetSessionPartnerParameters();

            Adjust.AppDidLaunch(config);

            // Put the SDK in offline mode.
            // Adjust.SetOfflineMode(true);

            // Disable the SDK.
            // Adjust.SetEnabled(false);

            // Send push notification token once you have obtained it or when it changes the value.
            // NSData pushNotificationToken = NSData.FromString("Token");
            // Adjust.SetDeviceToken(pushNotificationToken);

            return(true);
        }