コード例 #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 SimulateContentAccess(UIButton sender)
 {
     if (universalObject != null)
     {
         BranchIOS.GetInstance().RegisterView(universalObject);
     }
 }
コード例 #3
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());
            }
        }
コード例 #4
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);
     }
 }
コード例 #5
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();
        }
コード例 #6
0
        private void RefreshRewards()
        {
            lblRewardPoints.Text = "Reward Points = " + "updating...";

            BranchIOS.GetInstance().LoadRewards(this);
        }
コード例 #7
0
 public void RewardsRedeemed()
 {
     lblRewardPoints.Text = "Reward Points = " + BranchIOS.GetInstance().GetCredits().ToString();
     LogMessage("Branch.loadRewards changed: " + BranchIOS.GetInstance().GetCredits().ToString());
 }
コード例 #8
0
 partial void ShowRewardHistory(UIButton sender)
 {
     BranchIOS.GetInstance().GetCreditHistory(this);
 }
コード例 #9
0
 partial void SimulateLogout(UIButton sender)
 {
     BranchIOS.GetInstance().Logout(this);
 }
コード例 #10
0
 partial void SendBuyEvent(UIButton sender)
 {
     BranchIOS.GetInstance().UserCompletedAction("buy");
     RefreshRewards();
 }
コード例 #11
0
 partial void SetUserID(UIButton sender)
 {
     BranchIOS.GetInstance().SetIdentity("test_user_10", this);
 }
コード例 #12
0
 partial void RedeemPoints(UIButton sender)
 {
     BranchIOS.GetInstance().RedeemRewards(this, 5);
 }