public override bool FinishedLaunching(UIApplication app, NSDictionary options) { NSError error; #if TESTFLIGHT Analytics.SharedTracker.StartTracker("UA-31324545-3", 120, null); Analytics.SharedTracker.SetReferrer("TestFlight", out error); TestFlight.TakeOff("88e03730ca852e81d199baba95b9fc61_MTAxMDc3MjAxMi0wNi0xNyAyMzo0OToxNy44NzEzOTI"); #endif #if APPSTORE Analytics.SharedTracker.StartTracker("UA-31324545-3", 120, null); Flurry.StartSession("M3QY6NMPR8H9HSWT6YSM"); Flurry.SetSessionReportsOnPause(true); #endif Analytics.SharedTracker.TrackPageView("/launched", out error); StoreHelper.Load(); window = new UIWindow(UIScreen.MainScreen.Bounds); window.MakeKeyAndVisible(); if (selectedFilePathArray == null) { selectedFilePathArray = new List <string> (); } ShowSecretsView(); server.TransferEvent += Paste; return(true); }
private void ShowSecretsView() { var secret = currentSecret; RootElement root = CreateRootElement(); rootDVC = new StyledDialogViewController(root, null, backgroundColor) { Autorotate = true, HidesBottomBarWhenPushed = true }; rootDVC.ViewAppearing += (sender, e) => { server.Abort(); currentSecret = null; NSError err; Analytics.SharedTracker.TrackPageView("/secrets", out err); ReOrderSecrets(); }; var aboutButton = UIHelper.CreateInfoButton(40f, 60f); aboutButton.TouchDown += (sender, e) => { ShowAboutView(); }; rootDVC.View.AddSubview(aboutButton); navigation = new UINavigationController(); Flurry.LogAllPageViews(navigation); navigation.SetNavigationBarHidden(true, false); navigation.PushViewController(rootDVC, false); window.RootViewController = navigation; if (ResharedItem != null) { var sbounds = UIScreen.MainScreen.Bounds; var btnCancel = UIButton.FromType(UIButtonType.RoundedRect); btnCancel.Tag = CANCEL_BUTTON_TAG; btnCancel.Frame = new RectangleF( 10, sbounds.Height - 60f, 100, 30 ); btnCancel.SetTitle("Cancel", UIControlState.Normal); btnCancel.SetTitleColor(UIColor.Black, UIControlState.Normal); btnCancel.TouchDown += delegate { ResharedItem = null; if (rootDVC.View.ViewWithTag(CANCEL_BUTTON_TAG) != null) { rootDVC.View.ViewWithTag(CANCEL_BUTTON_TAG).RemoveFromSuperview(); } UpdateSecretsViewLabel(WELCOME_LABEL_TEXT); DisplaySecretDetail(secret); }; rootDVC.View.AddSubview(btnCancel); UpdateSecretsViewLabel(String.Format(SHARE_LABEL_TEXT, UrlHelper.GetFileName(ResharedItem.ItemPath))); } }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { //ALWAYS enable AppCircle, and THEN start Session, THEN set Delegate AppCircle.SetEnabled(true); Analytics.StartSession(API_KEY); _appCircleDelegate = new AppCircleDelegate(); AppCircle.SetAppCircleDelegate(_appCircleDelegate); //THENNN start regular code _window = new UIWindow(UIScreen.MainScreen.Bounds); var root = new RootViewController(); _window.RootViewController = root; _window.MakeKeyAndVisible(); return(true); }