示例#1
0
        public MainPage()
        {
            Appstart.Initialize();

            InitializeComponent();
            SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;

            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new ArtportalenApp.App());
        }
示例#2
0
        public override void OnCreate()
        {
            base.OnCreate();
            RegisterActivityLifecycleCallbacks(this);
            //A great place to initialize Xamarin.Insights and Dependency Services!

            // Xamarin insights
            Insights.HasPendingCrashReport += (sender, isStartupCrash) =>
            {
                if (isStartupCrash)
                {
                    Insights.PurgePendingCrashReports().Wait();
                }
            };
            Insights.Initialize(ConfigurationManager.AppSettings.XamarinInsightsApiKey, this);

            // Initialize
            Appstart.Initialize();

            ParseInitializer.Initialize();
        }
示例#3
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // Xamarin insights
            Insights.HasPendingCrashReport += (sender, isStartupCrash) =>
            {
                if (isStartupCrash)
                {
                    Insights.PurgePendingCrashReports().Wait();
                }
            };
            Insights.Initialize(ConfigurationManager.AppSettings.XamarinInsightsApiKey);

            TestFairy.Begin(ConfigurationManager.AppSettings.TestFairyAppToken);

            // Initialize
            Appstart.Initialize();
            ParseInitializer.Initialize();
            ParsePushInitialize();

            if (ParseUser.CurrentUser != null)
            {
                TestFairy.SetCorrelationId(ParseUser.CurrentUser.Email);
            }

            Xamarin.Forms.Forms.Init();
            Xamarin.FormsMaps.Init();

            LoadApplication(new App());

            // Newer version of Xamarin Studio and Visual Studio provide the
            // ENABLE_TEST_CLOUD compiler directive in the Debug configuration,
            // but not the Release configuration.
#if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
#endif

            return(base.FinishedLaunching(app, options));
        }