コード例 #1
0
        partial void ViewLatestReferringParams(UIButton sender)
        {
            logString  = BranchIOS.GetInstance().GetLastReferringBranchUniversalObject().ToJsonString() + "\n\n";
            logString += BranchIOS.GetInstance().GetLastReferringBranchLinkProperties().ToJsonString();

            PerformSegue("LogPush", this);
        }
コード例 #2
0
        partial void CreateBranchLink(UIButton sender)
        {
            try
            {
                universalObject = new BranchUniversalObject();
                universalObject.canonicalIdentifier = "id12345";
                universalObject.title = "id12345 title";
                universalObject.contentDescription = "My awesome piece of content!";
                universalObject.imageUrl           = "https://s3-us-west-1.amazonaws.com/branchhost/mosaic_og.png";
                universalObject.metadata.Add("foo", "bar");

                linkProperties = new BranchLinkProperties();
                linkProperties.tags.Add("tag1");
                linkProperties.tags.Add("tag2");
                linkProperties.feature = "sharing";
                linkProperties.channel = "facebook";
                linkProperties.controlParams.Add("$desktop_url", "http://example.com");

                BranchIOS.getInstance().GetShortURL(this, universalObject, linkProperties);
            }
            catch (Exception e)
            {
                LogMessage(e.ToString());
            }
        }
コード例 #3
0
        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            global::Xamarin.Forms.Forms.Init();
            iAd.ADBannerView aDBannerView = new ADBannerView();

            //BranchIOS.DelayInitToCheckForSearchAds();
            //BranchIOS.UseLongerWaitForAppleSearchAds();
            //BranchIOS.IgnoreAppleSearchAdsTestData();
            // set Debug mode
            //BranchIOS.Debug = true;

            //App app = new App ();
            //BranchIOS.Init ("your Branch key", launchOptions, app);
            //LoadApplication (app);

            // uncomment to try BranchUniversalObject
            AppBUO appBUO = new AppBUO();

            //BranchIOS.DelayInitToCheckForSearchAds();
            BranchIOS.Init("key_live_mglVaBqjIsSpREdbUa6DLahhABarUg0a", launchOptions, appBUO);

            // disable tracking of user data
            //BranchIOS.getInstance().SetTrackingDisabled(true);

            LoadApplication(appBUO);

            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
コード例 #4
0
        partial void ShareLink(UIButton sender)
        {
            try
            {
                if (universalObject == null)
                {
                    universalObject = new BranchUniversalObject();
                    universalObject.canonicalIdentifier = "id12345";
                    universalObject.title = "id12345 title";
                    universalObject.contentDescription = "My awesome piece of content!";
                    universalObject.imageUrl           = "https://s3-us-west-1.amazonaws.com/branchhost/mosaic_og.png";
                    universalObject.metadata.Add("foo", "bar");
                }

                if (linkProperties == null)
                {
                    linkProperties = new BranchLinkProperties();
                    linkProperties.tags.Add("tag1");
                    linkProperties.tags.Add("tag2");
                    linkProperties.feature = "invite";
                    linkProperties.channel = "Twitter";
                    linkProperties.stage   = "2";
                    linkProperties.controlParams.Add("$desktop_url", "http://example.com");
                }

                BranchIOS.GetInstance().ShareLink(this, universalObject, linkProperties, "hello there with short url");
            }
            catch (Exception e)
            {
                LogMessage(e.ToString());
            }
        }
コード例 #5
0
 partial void SimulateContentAccess(UIButton sender)
 {
     if (universalObject != null)
     {
         BranchIOS.GetInstance().RegisterView(universalObject);
     }
 }
コード例 #6
0
 partial void RegisterForSpotlight(UIButton sender)
 {
     if (universalObject != null)
     {
         universalObject.metadata.Add("deeplink_text", "This link was generated for Spotlight registration");
         BranchIOS.GetInstance().ListOnSpotlight(universalObject);
     }
 }
コード例 #7
0
ファイル: AppDelegate.cs プロジェクト: IshaDawar/Xamarin
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            BranchIOS.Debug = true;
            BranchIOS.Init("iOs_Live_key", options, this);
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
コード例 #8
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            storyboard = UIStoryboard.FromName("Main", null);

            BranchIOS.Debug = true;
            BranchIOS.Init(Constants.Branch_key, launchOptions, this);

            return(true);
        }
コード例 #9
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
#if DEBUG
            BranchIOS.Debug = true;
#endif
            BranchIOS.Init(BranchService.BranchKey, launchOptions, BranchService.Instance);

            return(base.FinishedLaunching(application, launchOptions));
        }
コード例 #10
0
        partial void SendComplexEvent(UIButton sender)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("name", "Alex");
            parameters.Add("boolean", true);
            parameters.Add("int", 1);
            parameters.Add("double", 0.13415512301);

            BranchIOS.GetInstance().UserCompletedAction("buy", parameters);
            RefreshRewards();
        }
コード例 #11
0
ファイル: AppDelegate.cs プロジェクト: dwestgate/xamarindocs
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            global::Xamarin.Forms.Forms.Init();

            // set Debug mode
            BranchIOS.Debug = true;

            App app = new App();

            BranchIOS.Init("Your Branch key here", launchOptions, app);
            LoadApplication(app);

            // uncomment to try BranchUniversalObject
//			AppBUO appBUO = new AppBUO ();
//			BranchIOS.Init ("Your Branch key here", launchOptions, appBUO);
//			LoadApplication (appBUO);

            return(base.FinishedLaunching(application, launchOptions));
        }
コード例 #12
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            global::Xamarin.Forms.Forms.Init();

            // set Debug mode
            BranchIOS.Debug = true;

            //App app = new App ();
            //BranchIOS.Init ("your Branch key", launchOptions, app);
            //LoadApplication (app);

            // uncomment to try BranchUniversalObject
            AppBUO appBUO = new AppBUO();

            BranchIOS.Init("key_live_bmEetSmsaI8OS6fCiyS5VmjhDqnfXBxP", launchOptions, appBUO);
            LoadApplication(appBUO);

            return(base.FinishedLaunching(application, launchOptions));
        }
コード例 #13
0
 public override void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)
 {
     BranchIOS.getInstance().HandlePushNotification(userInfo);
 }
コード例 #14
0
 public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler)
 {
     return(BranchIOS.getInstance().ContinueUserActivity(userActivity));
 }
コード例 #15
0
 public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
 {
     return(BranchIOS.getInstance().OpenUrl(url));
 }
コード例 #16
0
 partial void RedeemPoints(UIButton sender)
 {
     BranchIOS.GetInstance().RedeemRewards(this, 5);
 }
コード例 #17
0
        private void RefreshRewards()
        {
            lblRewardPoints.Text = "Reward Points = " + "updating...";

            BranchIOS.GetInstance().LoadRewards(this);
        }
コード例 #18
0
 public void RewardsRedeemed()
 {
     lblRewardPoints.Text = "Reward Points = " + BranchIOS.GetInstance().GetCredits().ToString();
     LogMessage("Branch.loadRewards changed: " + BranchIOS.GetInstance().GetCredits().ToString());
 }
コード例 #19
0
 partial void SetUserID(UIButton sender)
 {
     BranchIOS.GetInstance().SetIdentity("test_user_10", this);
 }
コード例 #20
0
 partial void SendBuyEvent(UIButton sender)
 {
     BranchIOS.GetInstance().UserCompletedAction("buy");
     RefreshRewards();
 }
コード例 #21
0
 partial void ShowRewardHistory(UIButton sender)
 {
     BranchIOS.GetInstance().GetCreditHistory(this);
 }
コード例 #22
0
 partial void SimulateLogout(UIButton sender)
 {
     BranchIOS.GetInstance().Logout(this);
 }