diff --git a/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml b/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml
index f0bd8addb..ab688fee9 100644
--- a/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml
+++ b/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
-
+
-
\ No newline at end of file
+
diff --git a/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs
index d1f52c2d0..81d33cae2 100644
--- a/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs
+++ b/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs
@@ -27,5 +27,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.1.0.0")]
-[assembly: AssemblyInformationalVersion("0.1.0-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Contoso.Forms.Demo.Droid.csproj b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Contoso.Forms.Demo.Droid.csproj
index c1ce1863d..141f7a585 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Contoso.Forms.Demo.Droid.csproj
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Contoso.Forms.Demo.Droid.csproj
@@ -37,7 +37,8 @@
4
true
false
- SdkOnly
+ Full
+ armeabi-v7a;armeabi;x86;arm64-v8a;x86_64
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/MainActivity.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/MainActivity.cs
index b6fb22821..8bca1de87 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/MainActivity.cs
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/MainActivity.cs
@@ -18,7 +18,7 @@ protected override void OnCreate(Bundle savedInstanceState)
Xamarin.Forms.Forms.Init(this, savedInstanceState);
- MobileCenter.Configure("095bc922-dc67-4f44-9c83-75d92b90534d");
+ MobileCenter.Configure("987b5941-4fac-4968-933e-98a7ff29237c");
LoadApplication(new App());
}
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Properties/AndroidManifest.xml b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Properties/AndroidManifest.xml
index 8f6e469e1..5270046e0 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Properties/AndroidManifest.xml
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
-
+
-
\ No newline at end of file
+
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Properties/AssemblyInfo.cs
index 3e719c3b1..4f66a1387 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Properties/AssemblyInfo.cs
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Properties/AssemblyInfo.cs
@@ -18,7 +18,9 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-[assembly: AssemblyVersion("1.0.0")]
+[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyFileVersion("0.4.1.0")]
+[assembly: AssemblyInformationalVersion("0.4.1")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/packages.config b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/packages.config
index e6103e7f3..92731779c 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/packages.config
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/packages.config
@@ -12,4 +12,4 @@
-
\ No newline at end of file
+
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.UWP/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.UWP/Properties/AssemblyInfo.cs
index 1f5913af1..32fc52d22 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.UWP/Properties/AssemblyInfo.cs
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.UWP/Properties/AssemblyInfo.cs
@@ -24,6 +24,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: ComVisible(false)]
\ No newline at end of file
+[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyFileVersion("0.4.1.0")]
+[assembly: ComVisible(false)]
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/AppDelegate.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/AppDelegate.cs
index 5807bea2d..a4227f587 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/AppDelegate.cs
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/AppDelegate.cs
@@ -1,27 +1,21 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-using Foundation;
-using UIKit;
-
+using Foundation;
using Microsoft.Azure.Mobile;
+using UIKit;
namespace Contoso.Forms.Demo.iOS
{
[Register("AppDelegate")]
- public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
+ public class AppDelegate : Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
- public override bool FinishedLaunching(UIApplication app, NSDictionary options)
+ public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
{
- global::Xamarin.Forms.Forms.Init();
+ Xamarin.Forms.Forms.Init();
- MobileCenter.Configure("2b3f11b1-6a90-4f28-9ae3-fc33b3c5d729");
+ MobileCenter.Configure("fe2bf05d-f4f9-48a6-83d9-ea8033fbb644");
LoadApplication(new App());
- return base.FinishedLaunching(app, options);
-
+ return base.FinishedLaunching(uiApplication, launchOptions);
}
}
}
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/Info.plist b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/Info.plist
index 3da4f5619..dc2be68b1 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/Info.plist
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/Info.plist
@@ -4,10 +4,8 @@
CFBundleIdentifier
com.microsoft.azure.mobile.xamarin.forms.demo
- CFBundleShortVersionString
- 1.0
CFBundleVersion
- 1.0
+ 0.4.1
LSRequiresIPhoneOS
MinimumOSVersion
@@ -40,5 +38,7 @@
Assets.xcassets/AppIcon.appiconset
CFBundleName
MCFDemo
+ CFBundleShortVersionString
+ 0.4.1
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/packages.config b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/packages.config
index c7b786a36..3c6ff74f1 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/packages.config
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/packages.config
@@ -4,4 +4,4 @@
-
\ No newline at end of file
+
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Contoso.Forms.Demo.csproj b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Contoso.Forms.Demo.csproj
index 3a870766c..2565fd0da 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Contoso.Forms.Demo.csproj
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Contoso.Forms.Demo.csproj
@@ -70,6 +70,7 @@
PropertiesContentPage.xaml
+
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml
index b8ec0c21f..1aa222582 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml
@@ -2,7 +2,7 @@
-
+
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml.cs
index 70c7a736a..9c91964b8 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml.cs
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using Microsoft.Azure.Mobile;
using Microsoft.Azure.Mobile.Analytics;
using Xamarin.Forms;
@@ -16,16 +17,17 @@ public Property(string propertyName, string propertyValue)
public string Value;
}
+ [Android.Runtime.Preserve(AllMembers = true)]
public partial class AnalyticsContentPage : ContentPage
{
- private List EventProperties;
+ List EventProperties;
public AnalyticsContentPage()
{
InitializeComponent();
EventProperties = new List();
NumPropertiesLabel.Text = EventProperties.Count.ToString();
- if (Device.OS == TargetPlatform.iOS)
+ if (Xamarin.Forms.Device.OS == TargetPlatform.iOS)
{
Icon = "lightning.png";
}
@@ -35,11 +37,12 @@ protected override void OnAppearing()
{
base.OnAppearing();
EnabledSwitchCell.On = Analytics.Enabled;
+ EnabledSwitchCell.IsEnabled = MobileCenter.Enabled;
}
- void AddProperty(object sender, System.EventArgs e)
+ void AddProperty(object sender, EventArgs e)
{
- AddPropertyContentPage addPage = new AddPropertyContentPage();
+ var addPage = new AddPropertyContentPage();
addPage.PropertyAdded += (Property property) => {
EventProperties.Add(property);
RefreshPropCount();
@@ -47,14 +50,14 @@ void AddProperty(object sender, System.EventArgs e)
Navigation.PushModalAsync(addPage);
}
- void PropertiesCellTapped(object sender, System.EventArgs e)
+ void PropertiesCellTapped(object sender, EventArgs e)
{
Navigation.PushAsync(new PropertiesContentPage(EventProperties));
}
- void TrackEvent(object sender, System.EventArgs e)
+ void TrackEvent(object sender, EventArgs e)
{
- Dictionary properties = new Dictionary();
+ var properties = new Dictionary();
foreach (Property property in EventProperties)
{
properties.Add(property.Name, property.Value);
@@ -72,12 +75,9 @@ void TrackEvent(object sender, System.EventArgs e)
}
- void UpdateEnabled(object sender, System.EventArgs e)
+ void UpdateEnabled(object sender, ToggledEventArgs e)
{
- if (EnabledSwitchCell != null)
- {
- Analytics.Enabled = EnabledSwitchCell.On;
- }
+ Analytics.Enabled = e.Value;
}
void RefreshPropCount()
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml
index 726bc9563..22d330933 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml
@@ -5,7 +5,7 @@
x:Class="Contoso.Forms.Demo.CrashesContentPage">
-
+
@@ -19,9 +19,6 @@
-
-
-
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml.cs
index feb91b214..22ea02087 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml.cs
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml.cs
@@ -1,16 +1,20 @@
-using System;
+#define DEBUG
+
+using System;
using System.IO;
+using Microsoft.Azure.Mobile;
using Microsoft.Azure.Mobile.Crashes;
using Xamarin.Forms;
namespace Contoso.Forms.Demo
{
+ [Android.Runtime.Preserve(AllMembers = true)]
public partial class CrashesContentPage
{
public CrashesContentPage()
{
InitializeComponent();
- if (Device.OS == TargetPlatform.iOS)
+ if (Xamarin.Forms.Device.OS == TargetPlatform.iOS)
{
Icon = "socket.png";
}
@@ -20,43 +24,31 @@ protected override void OnAppearing()
{
base.OnAppearing();
CrashesEnabledSwitchCell.On = Crashes.Enabled;
+ CrashesEnabledSwitchCell.IsEnabled = MobileCenter.Enabled;
}
- void TestCrash(object sender, System.EventArgs e)
- {
- Crashes.GenerateTestCrash();
- }
-
- void DivideByZero(object sender, System.EventArgs e)
- {
- (42 / int.Parse("0")).ToString();
- }
-
- void UpdateEnabled(object sender, System.EventArgs e)
- {
- if (CrashesEnabledSwitchCell != null)
- {
- Crashes.Enabled = CrashesEnabledSwitchCell.On;
- }
- }
-
- private void GenerateTestCrash(object sender, EventArgs e)
+ void TestCrash(object sender, EventArgs e)
{
Crashes.GenerateTestCrash();
}
- private void CatchNullReferenceException(object sender, EventArgs e)
+ void DivideByZero(object sender, EventArgs e)
{
try
{
- TriggerNullReferenceException();
+ int x = (42 / int.Parse("0"));
}
- catch (NullReferenceException ex)
+ catch (Exception)
{
- System.Diagnostics.Debug.WriteLine("null reference exception");
+ System.Diagnostics.Debug.WriteLine("CAUGHT THE EXCEPTION");
}
}
+ void UpdateEnabled(object sender, ToggledEventArgs e)
+ {
+ Crashes.Enabled = e.Value;
+ }
+
private void CrashWithNullReferenceException(object sender, EventArgs e)
{
TriggerNullReferenceException();
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml
index e8ea6d464..a537b1787 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml
@@ -3,7 +3,7 @@
xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Contoso.Forms.Demo.MobileCenterContentPage">
-
+
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml.cs
index 1f717987e..88cc6ad41 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml.cs
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml.cs
@@ -3,6 +3,7 @@
namespace Contoso.Forms.Demo
{
+ [Android.Runtime.Preserve(AllMembers = true)]
public partial class MobileCenterContentPage : ContentPage
{
public MobileCenterContentPage()
@@ -12,7 +13,7 @@ public MobileCenterContentPage()
{
Icon = "bolt.png";
}
- }
+ }
protected override void OnAppearing()
{
@@ -20,13 +21,9 @@ protected override void OnAppearing()
MobileCenterEnabledSwitchCell.On = MobileCenter.Enabled;
}
- void UpdateEnabled(object sender, System.EventArgs e)
+ void UpdateEnabled(object sender, ToggledEventArgs e)
{
- if (MobileCenterEnabledSwitchCell != null)
- {
- MobileCenter.Enabled = MobileCenterEnabledSwitchCell.On;
- }
+ MobileCenter.Enabled = e.Value;
}
-
- }
+ }
}
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/PreserveAttribute.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/PreserveAttribute.cs
new file mode 100644
index 000000000..654727351
--- /dev/null
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/PreserveAttribute.cs
@@ -0,0 +1,8 @@
+namespace Android.Runtime
+{
+ public sealed class PreserveAttribute : System.Attribute
+ {
+ public bool AllMembers;
+ public bool Conditional;
+ }
+}
\ No newline at end of file
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Properties/AssemblyInfo.cs
index 1bf558f6a..e8e1f9f07 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Properties/AssemblyInfo.cs
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Properties/AssemblyInfo.cs
@@ -17,7 +17,9 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-[assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyFileVersion("0.4.1.0")]
+[assembly: AssemblyInformationalVersion("0.4.1")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/packages.config b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/packages.config
index 8d7d6099d..284fd5d68 100644
--- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/packages.config
+++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/packages.config
@@ -4,4 +4,4 @@
-
\ No newline at end of file
+
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj
index f210013ca..ea1cad558 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj
@@ -26,7 +26,7 @@
prompt
4
None
- arm64-v8a;armeabi;armeabi-v7a;x86
+ arm64-v8a;armeabi;armeabi-v7a;x86;x86_64
true
@@ -37,6 +37,8 @@
4
true
false
+ armeabi-v7a;armeabi;x86;arm64-v8a;x86_64
+ Full
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/MainActivity.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/MainActivity.cs
index de302b334..94382d00e 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/MainActivity.cs
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/MainActivity.cs
@@ -17,6 +17,8 @@ protected override void OnCreate(Bundle savedInstanceState)
Xamarin.Forms.Forms.Init(this, savedInstanceState);
+ MobileCenterLog.Assert(App.LogTag, "MobileCenter.Configured=" + MobileCenter.Configured);
+ MobileCenterLog.Assert(App.LogTag, "MobileCenter.InstallId (before configure)=" + MobileCenter.InstallId);
MobileCenter.SetServerUrl("https://in-integration.dev.avalanch.es");
MobileCenter.Configure("7f222d3c-0f5e-421b-93e7-f862c462e07e");
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml
index 696eca6fe..d43b036c0 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
-
+
-
\ No newline at end of file
+
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs
index b53cb6ecd..ca01eacfc 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs
@@ -18,7 +18,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-[assembly: AssemblyVersion("1.0.0")]
+[assembly: AssemblyVersion("0.0.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs
index 9bd11e194..82e58077e 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs
@@ -24,6 +24,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: ComVisible(false)]
\ No newline at end of file
+[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: ComVisible(false)]
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/AppDelegate.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/AppDelegate.cs
index 49222b53b..42a2b093a 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/AppDelegate.cs
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/AppDelegate.cs
@@ -11,6 +11,8 @@ public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary
{
Xamarin.Forms.Forms.Init();
+ MobileCenterLog.Assert(App.LogTag, "MobileCenter.Configured=" + MobileCenter.Configured);
+ MobileCenterLog.Assert(App.LogTag, "MobileCenter.InstallId (before configure)=" + MobileCenter.InstallId);
MobileCenter.SetServerUrl("https://in-integration.dev.avalanch.es");
MobileCenter.Configure("b889c4f2-9ac2-4e2e-ae16-dae54f2c5899");
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Contoso.Forms.Puppet.iOS.csproj b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Contoso.Forms.Puppet.iOS.csproj
index 5961d5b78..d315d9d4a 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Contoso.Forms.Puppet.iOS.csproj
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Contoso.Forms.Puppet.iOS.csproj
@@ -15,7 +15,7 @@
full
false
bin\iPhoneSimulator\Debug
- DEBUG;ENABLE_TEST_CLOUD;
+ __UNIFIED__;__MOBILE__;__IOS__;DEBUG;ENABLE_TEST_CLOUD;
prompt
4
iPhone Developer
@@ -24,7 +24,7 @@
true
true
None
- i386
+ x86_64
HttpClientHandler
Default
false
@@ -58,7 +58,7 @@
iPhone Developer
true
true
- None
+ Full
i386
HttpClientHandler
Default
@@ -162,5 +162,6 @@
+
-
\ No newline at end of file
+
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist
index 3a2c8feec..3249201e2 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist
@@ -5,9 +5,9 @@
CFBundleIdentifier
com.microsoft.azure.mobile.xamarin.forms.puppet
CFBundleShortVersionString
- 1.0
+ 0.5.0
CFBundleVersion
- 1.0
+ 0.5.0
LSRequiresIPhoneOS
MinimumOSVersion
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs
index c3bc3c472..24646ec22 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs
@@ -8,7 +8,7 @@ namespace Contoso.Forms.Puppet
{
public partial class App : Application
{
- private const string LogTag = "MobileCenterXamarinPuppet";
+ public const string LogTag = "MobileCenterXamarinPuppet";
public App()
{
@@ -22,6 +22,7 @@ protected override void OnStart()
MobileCenterLog.Assert(LogTag, "MobileCenter.LogLevel=" + MobileCenter.LogLevel);
MobileCenter.LogLevel = LogLevel.Verbose;
MobileCenterLog.Info(LogTag, "MobileCenter.LogLevel=" + MobileCenter.LogLevel);
+ MobileCenterLog.Info(LogTag, "MobileCenter.Configured=" + MobileCenter.Configured);
//set event handlers
Crashes.SendingErrorReport += SendingErrorReportHandler;
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Constants.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Constants.cs
index 1c262c6f5..e1cea3d24 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Constants.cs
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Constants.cs
@@ -1,7 +1,6 @@
-using System;
-
-namespace Contoso.Forms.Puppet
+namespace Contoso.Forms.Puppet
{
+ [Android.Runtime.Preserve(AllMembers = true)]
public static class Constants
{
public const string Verbose = "Verbose";
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Contoso.Forms.Puppet.csproj b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Contoso.Forms.Puppet.csproj
index f77ccd1d3..c5f7ab6e0 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Contoso.Forms.Puppet.csproj
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Contoso.Forms.Puppet.csproj
@@ -77,6 +77,10 @@
PropertiesContentPage.xaml
+
+
+
+
@@ -115,4 +119,4 @@
-
\ No newline at end of file
+
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml
index 7ee74c16e..5a78b9531 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml
@@ -2,7 +2,7 @@
-
+
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs
index cd4b75f60..c2b8d4d62 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using Microsoft.Azure.Mobile;
using Microsoft.Azure.Mobile.Analytics;
using Xamarin.Forms;
@@ -16,9 +17,10 @@ public Property(string propertyName, string propertyValue)
public string Value;
}
+ [Android.Runtime.Preserve(AllMembers = true)]
public partial class AnalyticsContentPage : ContentPage
{
- private List EventProperties;
+ List EventProperties;
public AnalyticsContentPage()
{
@@ -36,27 +38,28 @@ protected override void OnAppearing()
{
base.OnAppearing();
EnabledSwitchCell.On = Analytics.Enabled;
+ EnabledSwitchCell.IsEnabled = MobileCenter.Enabled;
}
-
- void AddProperty(object sender, System.EventArgs e)
+ void AddProperty(object sender, EventArgs e)
{
- AddPropertyContentPage addPage = new AddPropertyContentPage();
- addPage.PropertyAdded += (Property property) => {
- EventProperties.Add(property);
+ var addPage = new AddPropertyContentPage();
+ addPage.PropertyAdded += (Property property) =>
+ {
+ EventProperties.Add(property);
RefreshPropCount();
};
Navigation.PushModalAsync(addPage);
}
- void PropertiesCellTapped(object sender, System.EventArgs e)
+ void PropertiesCellTapped(object sender, EventArgs e)
{
Navigation.PushAsync(new PropertiesContentPage(EventProperties));
}
- void TrackEvent(object sender, System.EventArgs e)
+ void TrackEvent(object sender, EventArgs e)
{
- Dictionary properties = new Dictionary();
+ var properties = new Dictionary();
foreach (Property property in EventProperties)
{
properties.Add(property.Name, property.Value);
@@ -74,12 +77,9 @@ void TrackEvent(object sender, System.EventArgs e)
}
- void UpdateEnabled(object sender, System.EventArgs e)
+ void UpdateEnabled(object sender, ToggledEventArgs e)
{
- if (EnabledSwitchCell != null)
- {
- Analytics.Enabled = EnabledSwitchCell.On;
- }
+ Analytics.Enabled = e.Value;
}
void RefreshPropCount()
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml
index 5afafb465..156930e7b 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml
@@ -5,7 +5,7 @@
x:Class="Contoso.Forms.Puppet.CrashesContentPage">
-
+
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs
index 747119d2b..ab421712d 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs
@@ -1,16 +1,18 @@
using System;
using System.IO;
+using Microsoft.Azure.Mobile;
using Microsoft.Azure.Mobile.Crashes;
using Xamarin.Forms;
namespace Contoso.Forms.Puppet
{
+ [Android.Runtime.Preserve(AllMembers = true)]
public partial class CrashesContentPage
{
public CrashesContentPage()
{
InitializeComponent();
- if (Device.OS == TargetPlatform.iOS)
+ if (Xamarin.Forms.Device.OS == TargetPlatform.iOS)
{
Icon = "socket.png";
}
@@ -20,49 +22,50 @@ protected override void OnAppearing()
{
base.OnAppearing();
CrashesEnabledSwitchCell.On = Crashes.Enabled;
+ CrashesEnabledSwitchCell.IsEnabled = MobileCenter.Enabled;
}
- void TestCrash(object sender, System.EventArgs e)
+ void TestCrash(object sender, EventArgs e)
{
Crashes.GenerateTestCrash();
}
- void DivideByZero(object sender, System.EventArgs e)
+ void DivideByZero(object sender, EventArgs e)
{
- (42 / int.Parse("0")).ToString();
+ /* This is supposed to cause a crash, so we don't care that the variable 'x' is never used */
+ #pragma warning disable CS0219
+ int x = (42 / int.Parse("0"));
+ #pragma warning restore CS0219
}
- void UpdateEnabled(object sender, System.EventArgs e)
+ void UpdateEnabled(object sender, ToggledEventArgs e)
{
- if (CrashesEnabledSwitchCell != null)
- {
- Crashes.Enabled = CrashesEnabledSwitchCell.On;
- }
+ Crashes.Enabled = e.Value;
}
- private void GenerateTestCrash(object sender, EventArgs e)
+ void GenerateTestCrash(object sender, EventArgs e)
{
Crashes.GenerateTestCrash();
}
- private void CatchNullReferenceException(object sender, EventArgs e)
+ void CatchNullReferenceException(object sender, EventArgs e)
{
try
{
TriggerNullReferenceException();
}
- catch (NullReferenceException ex)
+ catch (NullReferenceException)
{
System.Diagnostics.Debug.WriteLine("null reference exception");
}
}
- private void CrashWithNullReferenceException(object sender, EventArgs e)
+ void CrashWithNullReferenceException(object sender, EventArgs e)
{
TriggerNullReferenceException();
}
- private void TriggerNullReferenceException()
+ void TriggerNullReferenceException()
{
string[] values = { "one", null, "two" };
for (int ctr = 0; ctr <= values.GetUpperBound(0); ctr++)
@@ -71,12 +74,12 @@ private void TriggerNullReferenceException()
System.Diagnostics.Debug.WriteLine("");
}
- private void CrashWithAggregateException(object sender, EventArgs e)
+ void CrashWithAggregateException(object sender, EventArgs e)
{
throw PrepareException();
}
- private static Exception PrepareException()
+ static Exception PrepareException()
{
try
{
@@ -88,7 +91,7 @@ private static Exception PrepareException()
}
}
- private static Exception SendHttp()
+ static Exception SendHttp()
{
try
{
@@ -100,7 +103,7 @@ private static Exception SendHttp()
}
}
- private static Exception ValidateLength()
+ static Exception ValidateLength()
{
try
{
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml
index 91cd3a6aa..077798229 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml
@@ -3,7 +3,7 @@
xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Contoso.Forms.Puppet.MobileCenterContentPage">
-
+
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs
index cb939a59d..de5beedf7 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs
@@ -6,13 +6,14 @@
namespace Contoso.Forms.Puppet
{
+ [Android.Runtime.Preserve(AllMembers = true)]
public partial class MobileCenterContentPage : ContentPage
{
// E.g., calling LogFunctions["Verbose"](tag, msg) will be
// equivalent to calling Verbose(tag, msg)
- private Dictionary> LogFunctions;
- private Dictionary LogLevelNames;
- private LogLevel LogWriteLevel;
+ Dictionary> LogFunctions;
+ Dictionary LogLevelNames;
+ LogLevel LogWriteLevel;
public MobileCenterContentPage()
{
@@ -50,16 +51,17 @@ protected override void OnAppearing()
}
- void LogLevelCellTapped(object sender, System.EventArgs e)
+ void LogLevelCellTapped(object sender, EventArgs e)
{
var page = new LogLevelPage();
- page.LevelSelected += (LogLevel level) => {
+ page.LevelSelected += (LogLevel level) =>
+ {
MobileCenter.LogLevel = level;
};
- ((NavigationPage)App.Current.MainPage).PushAsync(page);
+ ((NavigationPage)Application.Current.MainPage).PushAsync(page);
}
- void LogWriteLevelCellTapped(object sender, System.EventArgs e)
+ void LogWriteLevelCellTapped(object sender, EventArgs e)
{
var page = new LogLevelPage();
page.LevelSelected += (LogLevel level) =>
@@ -67,7 +69,7 @@ void LogWriteLevelCellTapped(object sender, System.EventArgs e)
LogWriteLevel = level;
UpdateLogWriteLevelLabel();
};
- ((NavigationPage)App.Current.MainPage).PushAsync(page);
+ ((NavigationPage)Application.Current.MainPage).PushAsync(page);
}
void WriteLog(object sender, System.EventArgs e)
@@ -77,12 +79,9 @@ void WriteLog(object sender, System.EventArgs e)
LogFunctions[LogWriteLevel](tag, message);
}
- void UpdateEnabled(object sender, System.EventArgs e)
+ void UpdateEnabled(object sender, ToggledEventArgs e)
{
- if (MobileCenterEnabledSwitchCell != null)
- {
- MobileCenter.Enabled = MobileCenterEnabledSwitchCell.On;
- }
+ MobileCenter.Enabled = e.Value;
}
void UpdateLogWriteLevelLabel()
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/PreserveAttribute.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/PreserveAttribute.cs
new file mode 100644
index 000000000..654727351
--- /dev/null
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/PreserveAttribute.cs
@@ -0,0 +1,8 @@
+namespace Android.Runtime
+{
+ public sealed class PreserveAttribute : System.Attribute
+ {
+ public bool AllMembers;
+ public bool Conditional;
+ }
+}
\ No newline at end of file
diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs
index 492ad283f..efed350f5 100644
--- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs
+++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs
@@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-[assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("0.0.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
diff --git a/Apps/Contoso.iOS.Puppet/AppDelegate.cs b/Apps/Contoso.iOS.Puppet/AppDelegate.cs
index aaecd3152..b31598ee8 100644
--- a/Apps/Contoso.iOS.Puppet/AppDelegate.cs
+++ b/Apps/Contoso.iOS.Puppet/AppDelegate.cs
@@ -7,76 +7,76 @@
namespace Contoso.iOS.Puppet
{
- // The UIApplicationDelegate for the application. This class is responsible for launching the
- // User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
- [Register("AppDelegate")]
- public class AppDelegate : UIApplicationDelegate
- {
- // class-level declarations
+ // The UIApplicationDelegate for the application. This class is responsible for launching the
+ // User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
+ [Register("AppDelegate")]
+ public class AppDelegate : UIApplicationDelegate
+ {
+ // class-level declarations
- public override UIWindow Window
- {
- get;
- set;
- }
+ public override UIWindow Window
+ {
+ get;
+ set;
+ }
- public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
- {
- // Override point for customization after application launch.
- // If not required for your application you can safely delete this method
+ public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
+ {
+ // Override point for customization after application launch.
+ // If not required for your application you can safely delete this method
- MobileCenter.LogLevel = LogLevel.Verbose;
+ MobileCenter.LogLevel = LogLevel.Verbose;
- //MobileCenter.SetServerUrl("http://in-integration.dev.avalanch.es:8081");
- MobileCenter.Start("b5ac8947-ee9d-4f05-8009-426687eb2381", typeof(Analytics), typeof(Crashes));
+ //MobileCenter.SetServerUrl("http://in-integration.dev.avalanch.es:8081");
+ MobileCenter.Start("b5ac8947-ee9d-4f05-8009-426687eb2381", typeof(Analytics), typeof(Crashes));
- try
- {
- ThrowAnException();
- }
- catch(Exception e)
- {
- MobileCenterLog.Verbose("THETAG", "THEMESSAGE", e);
- }
+ try
+ {
+ ThrowAnException();
+ }
+ catch (Exception e)
+ {
+ MobileCenterLog.Verbose("THETAG", "THEMESSAGE", e);
+ }
Analytics.Enabled = true;
System.Diagnostics.Debug.WriteLine("ANALYTICS: " + Analytics.Enabled.ToString());
- return true;
- }
- private void ThrowAnException()
- {
- throw new Exception();
- }
- public override void OnResignActivation(UIApplication application)
- {
- // Invoked when the application is about to move from active to inactive state.
- // This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message)
- // or when the user quits the application and it begins the transition to the background state.
- // Games should use this method to pause the game.
- }
+ return true;
+ }
+ private void ThrowAnException()
+ {
+ throw new Exception();
+ }
+ public override void OnResignActivation(UIApplication application)
+ {
+ // Invoked when the application is about to move from active to inactive state.
+ // This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message)
+ // or when the user quits the application and it begins the transition to the background state.
+ // Games should use this method to pause the game.
+ }
- public override void DidEnterBackground(UIApplication application)
- {
- // Use this method to release shared resources, save user data, invalidate timers and store the application state.
- // If your application supports background exection this method is called instead of WillTerminate when the user quits.
- }
+ public override void DidEnterBackground(UIApplication application)
+ {
+ // Use this method to release shared resources, save user data, invalidate timers and store the application state.
+ // If your application supports background exection this method is called instead of WillTerminate when the user quits.
+ }
- public override void WillEnterForeground(UIApplication application)
- {
- // Called as part of the transiton from background to active state.
- // Here you can undo many of the changes made on entering the background.
- }
+ public override void WillEnterForeground(UIApplication application)
+ {
+ // Called as part of the transiton from background to active state.
+ // Here you can undo many of the changes made on entering the background.
+ }
- public override void OnActivated(UIApplication application)
- {
- // Restart any tasks that were paused (or not yet started) while the application was inactive.
- // If the application was previously in the background, optionally refresh the user interface.
- }
+ public override void OnActivated(UIApplication application)
+ {
+ // Restart any tasks that were paused (or not yet started) while the application was inactive.
+ // If the application was previously in the background, optionally refresh the user interface.
+ }
- public override void WillTerminate(UIApplication application)
- {
- // Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
- }
- }
+ public override void WillTerminate(UIApplication application)
+ {
+ // Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
+ }
+ }
}
diff --git a/Apps/Contoso.iOS.Puppet/Contoso.iOS.Puppet.csproj b/Apps/Contoso.iOS.Puppet/Contoso.iOS.Puppet.csproj
index 7e5cf03aa..909690129 100644
--- a/Apps/Contoso.iOS.Puppet/Contoso.iOS.Puppet.csproj
+++ b/Apps/Contoso.iOS.Puppet/Contoso.iOS.Puppet.csproj
@@ -60,7 +60,7 @@
iPhone Developer
true
true
- None
+ Full
i386
HttpClientHandler
Default
diff --git a/Apps/Contoso.iOS.Puppet/Info.plist b/Apps/Contoso.iOS.Puppet/Info.plist
index ee74711b3..12d81199d 100644
--- a/Apps/Contoso.iOS.Puppet/Info.plist
+++ b/Apps/Contoso.iOS.Puppet/Info.plist
@@ -7,9 +7,9 @@
CFBundleIdentifier
com.microsoft.azure.mobile.xamarin.puppet
CFBundleShortVersionString
- 1.0
+ 0.5.0
CFBundleVersion
- 1.0
+ 0.5.0
LSRequiresIPhoneOS
MinimumOSVersion
diff --git a/MobileCenter-SDK-Test.sln b/MobileCenter-SDK-Test.sln
new file mode 100644
index 000000000..bd2e6c462
--- /dev/null
+++ b/MobileCenter-SDK-Test.sln
@@ -0,0 +1,73 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Test", "Tests\Contoso.Forms.Test\Contoso.Forms.Test.csproj", "{AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}"
+EndProject
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Contoso.Forms.Test.Strings", "Tests\Contoso.Forms.Test.Strings\Contoso.Forms.Test.Strings.shproj", "{7B6E79A4-FBAF-4E7E-B696-0AC10D0A2552}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Test.Droid", "Tests\Droid\Contoso.Forms.Test.Droid.csproj", "{64D0912F-65B5-49DC-88B5-D1261B63D6A3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Test.iOS", "Tests\iOS\Contoso.Forms.Test.iOS.csproj", "{122FE275-3721-4C40-A1AA-E7D22813C8B9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Test.UITests", "Tests\UITests\Contoso.Forms.Test.UITests.csproj", "{78990F7A-6C3E-4007-B0E3-A8BF9625A327}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Release|iPhone = Release|iPhone
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Debug|iPhone = Debug|iPhone
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|iPhone.Build.0 = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|iPhone.Build.0 = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|Any CPU.ActiveCfg = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|Any CPU.Build.0 = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|iPhone.ActiveCfg = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|iPhone.Build.0 = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|iPhone.Build.0 = Debug|iPhone
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|Any CPU.Build.0 = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|iPhone.Build.0 = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|iPhone.Build.0 = Debug|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/MobileCenter-SDK.sln b/MobileCenter-SDK.sln
index e7bbc734f..3223639b7 100644
--- a/MobileCenter-SDK.sln
+++ b/MobileCenter-SDK.sln
@@ -67,12 +67,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Demo.Droid",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Demo.iOS", "Apps\Contoso.Forms.Demo\Contoso.Forms.Demo.iOS\Contoso.Forms.Demo.iOS.csproj", "{EB8F7B8E-5013-4C0C-9C32-59ADC5FDFDBD}"
EndProject
-Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.Azure.Mobile.Crashes.Shared.Targets", "SDK\MobileCenterCrashes\Microsoft.Azure.Mobile.Crashes.Shared.Targets\Microsoft.Azure.Mobile.Crashes.Shared.Targets.shproj", "{CAE55C79-1601-400D-86BF-03AB8CC5B8B9}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{4C54D493-95FE-44DA-B3E4-FA17B594D72C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Test", "Tests\Contoso.Forms.Test\Contoso.Forms.Test.csproj", "{AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Test.iOS", "Tests\iOS\Contoso.Forms.Test.iOS.csproj", "{122FE275-3721-4C40-A1AA-E7D22813C8B9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Test.Droid", "Tests\Droid\Contoso.Forms.Test.Droid.csproj", "{64D0912F-65B5-49DC-88B5-D1261B63D6A3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Test.UITests", "Tests\UITests\Contoso.Forms.Test.UITests.csproj", "{78990F7A-6C3E-4007-B0E3-A8BF9625A327}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Puppet.UWP", "Apps\Contoso.Forms.Puppet\Contoso.Forms.Puppet.UWP\Contoso.Forms.Puppet.UWP.csproj", "{F2E21B65-DF87-40F0-BB2E-E67E728B86DA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contoso.Forms.Demo.UWP", "Apps\Contoso.Forms.Demo\Contoso.Forms.Demo.UWP\Contoso.Forms.Demo.UWP.csproj", "{665362D9-5EE2-45DE-A907-25DC86999A68}"
EndProject
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Contoso.Forms.Test.Strings", "Tests\Contoso.Forms.Test.Strings\Contoso.Forms.Test.Strings.shproj", "{7B6E79A4-FBAF-4E7E-B696-0AC10D0A2552}"
+EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
SDK\MobileCenter\Microsoft.Azure.Mobile.Shared\Microsoft.Azure.Mobile.Shared.projitems*{119c1730-e109-4bc9-aa89-9dca2c50bfd5}*SharedItemsImports = 4
@@ -1218,6 +1228,198 @@ Global
{EB8F7B8E-5013-4C0C-9C32-59ADC5FDFDBD}.Release|x64.Build.0 = Release|iPhone
{EB8F7B8E-5013-4C0C-9C32-59ADC5FDFDBD}.Release|x86.ActiveCfg = Release|iPhone
{EB8F7B8E-5013-4C0C-9C32-59ADC5FDFDBD}.Release|x86.Build.0 = Release|iPhone
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|x64.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.AppStore|x86.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|ARM.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|x64.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Debug|x86.Build.0 = Debug|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|ARM.ActiveCfg = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|ARM.Build.0 = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|iPhone.Build.0 = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|x64.ActiveCfg = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|x64.Build.0 = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|x86.ActiveCfg = Release|Any CPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}.Release|x86.Build.0 = Release|Any CPU
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|ARM.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|ARM.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|iPhone.ActiveCfg = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|iPhone.Build.0 = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|x64.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|x64.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|x86.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Ad-Hoc|x86.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|ARM.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|ARM.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|iPhone.ActiveCfg = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|iPhone.Build.0 = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|x64.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|x64.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|x86.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.AppStore|x86.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|ARM.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|iPhone.Build.0 = Debug|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|x64.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Debug|x86.Build.0 = Debug|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|Any CPU.ActiveCfg = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|Any CPU.Build.0 = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|ARM.ActiveCfg = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|ARM.Build.0 = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|iPhone.ActiveCfg = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|iPhone.Build.0 = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|x64.ActiveCfg = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|x64.Build.0 = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|x86.ActiveCfg = Release|iPhone
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}.Release|x86.Build.0 = Release|iPhone
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|x64.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.AppStore|x86.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|ARM.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|x64.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Debug|x86.Build.0 = Debug|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|ARM.ActiveCfg = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|ARM.Build.0 = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|iPhone.Build.0 = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|x64.ActiveCfg = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|x64.Build.0 = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|x86.ActiveCfg = Release|Any CPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}.Release|x86.Build.0 = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|x64.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.AppStore|x86.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|ARM.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|x64.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Debug|x86.Build.0 = Debug|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|Any CPU.Build.0 = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|ARM.ActiveCfg = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|ARM.Build.0 = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|iPhone.Build.0 = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|x64.ActiveCfg = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|x64.Build.0 = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|x86.ActiveCfg = Release|Any CPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}.Release|x86.Build.0 = Release|Any CPU
{F2E21B65-DF87-40F0-BB2E-E67E728B86DA}.Ad-Hoc|Any CPU.ActiveCfg = Release|x64
{F2E21B65-DF87-40F0-BB2E-E67E728B86DA}.Ad-Hoc|Any CPU.Build.0 = Release|x64
{F2E21B65-DF87-40F0-BB2E-E67E728B86DA}.Ad-Hoc|Any CPU.Deploy.0 = Release|x64
@@ -1383,9 +1585,14 @@ Global
{8E7B51FC-8A9B-49F7-A40D-4D12BBF893B6} = {91CEE2C9-F64C-45C9-9353-B1EC87D13C6D}
{3B39B339-86C4-47EF-8F85-811220494CA6} = {91CEE2C9-F64C-45C9-9353-B1EC87D13C6D}
{EB8F7B8E-5013-4C0C-9C32-59ADC5FDFDBD} = {91CEE2C9-F64C-45C9-9353-B1EC87D13C6D}
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916} = {4C54D493-95FE-44DA-B3E4-FA17B594D72C}
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9} = {4C54D493-95FE-44DA-B3E4-FA17B594D72C}
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3} = {4C54D493-95FE-44DA-B3E4-FA17B594D72C}
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327} = {4C54D493-95FE-44DA-B3E4-FA17B594D72C}
{CAE55C79-1601-400D-86BF-03AB8CC5B8B9} = {7FAAA086-4453-4B62-AD9A-2E2ED216E3C4}
{F2E21B65-DF87-40F0-BB2E-E67E728B86DA} = {088DA4BA-0AFB-4690-A639-7559BE14D0C8}
{665362D9-5EE2-45DE-A907-25DC86999A68} = {91CEE2C9-F64C-45C9-9353-B1EC87D13C6D}
+ {7B6E79A4-FBAF-4E7E-B696-0AC10D0A2552} = {4C54D493-95FE-44DA-B3E4-FA17B594D72C}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android.Bindings/Properties/AssemblyInfo.cs
index beb346825..433f8aa61 100644
--- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android.Bindings/Properties/AssemblyInfo.cs
+++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android.Bindings/Properties/AssemblyInfo.cs
@@ -25,5 +25,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.4.1.0")]
-[assembly: AssemblyInformationalVersion("0.4.1-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/MobileCenter.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/MobileCenter.cs
index f196aaee6..adaa05685 100644
--- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/MobileCenter.cs
+++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/MobileCenter.cs
@@ -85,6 +85,17 @@ public static void SetServerUrl(string serverUrl)
AndroidMobileCenter.SetServerUrl(serverUrl);
}
+ ///
+ /// Check whether SDK has already been configured or not.
+ ///
+ public static bool Configured
+ {
+ get
+ {
+ return AndroidMobileCenter.IsConfigured;
+ }
+ }
+
///
/// Configure the SDK.
/// This may be called only once per application process lifetime.
@@ -135,7 +146,18 @@ public static bool Enabled
///
/// The identifier is lost if clearing application data or uninstalling application.
///
- public static Guid InstallId => Guid.Parse(AndroidMobileCenter.InstallId.ToString());
+ public static Guid? InstallId
+ {
+ get
+ {
+ var installId = AndroidMobileCenter.InstallId;
+ if (installId != null)
+ {
+ return Guid.Parse(installId.ToString());
+ }
+ return null;
+ }
+ }
private static Application SetWrapperSdkAndGetApplication()
{
diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Properties/AssemblyInfo.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Properties/AssemblyInfo.cs
index ea6035b85..aba22b463 100644
--- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Properties/AssemblyInfo.cs
+++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Properties/AssemblyInfo.cs
@@ -25,5 +25,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.4.1.0")]
-[assembly: AssemblyInformationalVersion("0.4.1-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs
index 91108d2e2..657c379e4 100644
--- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs
+++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs
@@ -1,11 +1,10 @@
-using System.Reflection;
-
-namespace Microsoft.Azure.Mobile
+namespace Microsoft.Azure.Mobile
{
public static class WrapperSdk
{
public const string Name = "mobilecenter.xamarin";
- internal static readonly string Version = typeof(WrapperSdk).GetTypeInfo().Assembly.GetCustomAttribute().InformationalVersion;
+ /* We can't use reflection for assemblyInformationalVersion on iOS with "Link All" optimization. */
+ internal const string Version = "0.5.0-SNAPSHOT";
}
-}
\ No newline at end of file
+}
diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS.Bindings/ApiDefinition.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS.Bindings/ApiDefinition.cs
index ee2baed5d..2cdd3aa1a 100644
--- a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS.Bindings/ApiDefinition.cs
+++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS.Bindings/ApiDefinition.cs
@@ -148,7 +148,7 @@ interface MSMobileCenter
// +(BOOL)isConfigured;
[Static]
[Export("isConfigured")]
- bool isConfigured();
+ bool IsConfigured();
// +(void)setServerUrl:(NSString *)serverUrl;
[Static]
diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/MobileCenter.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/MobileCenter.cs
index 5de6c61b1..a4d1cff66 100644
--- a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/MobileCenter.cs
+++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/MobileCenter.cs
@@ -84,6 +84,17 @@ public static void SetServerUrl(string serverUrl)
iOSMobileCenter.SetServerUrl(serverUrl);
}
+ ///
+ /// Check whether SDK has already been configured or not.
+ ///
+ public static bool Configured
+ {
+ get
+ {
+ return iOSMobileCenter.IsConfigured();
+ }
+ }
+
///
/// Configure the SDK.
/// This may be called only once per application process lifetime.
@@ -139,7 +150,7 @@ public static bool Enabled
///
/// The identifier is lost if clearing application data or uninstalling application.
///
- public static Guid InstallId => Guid.Parse(iOSMobileCenter.InstallId().ToString());
+ public static Guid? InstallId => Guid.Parse(iOSMobileCenter.InstallId().ToString());
private static Class[] GetServices(IEnumerable services)
{
diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/Properties/AssemblyInfo.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/Properties/AssemblyInfo.cs
index 981374df5..054599523 100644
--- a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/Properties/AssemblyInfo.cs
+++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/Properties/AssemblyInfo.cs
@@ -24,5 +24,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.4.1.0")]
-[assembly: AssemblyInformationalVersion("0.4.1-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile/MobileCenter.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile/MobileCenter.cs
index 0418cd490..e3efba5ae 100644
--- a/SDK/MobileCenter/Microsoft.Azure.Mobile/MobileCenter.cs
+++ b/SDK/MobileCenter/Microsoft.Azure.Mobile/MobileCenter.cs
@@ -34,7 +34,7 @@ public static class MobileCenter
///
/// The identifier is lost if clearing application data or uninstalling application.
///
- public static Guid InstallId { get; set; }
+ public static Guid? InstallId { get; set; }
///
/// Change the base URL (scheme + authority + port only) used to communicate with the backend.
@@ -44,6 +44,11 @@ public static void SetServerUrl(string serverUrl)
{
}
+ ///
+ /// Check whether SDK has already been configured or not.
+ ///
+ public static bool Configured { get; }
+
///
/// Configure the SDK.
/// This may be called only once per application process lifetime.
diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile/Properties/AssemblyInfo.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile/Properties/AssemblyInfo.cs
index 2ffd6fbfb..fa95e4dd7 100644
--- a/SDK/MobileCenter/Microsoft.Azure.Mobile/Properties/AssemblyInfo.cs
+++ b/SDK/MobileCenter/Microsoft.Azure.Mobile/Properties/AssemblyInfo.cs
@@ -25,5 +25,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.4.1.0")]
-[assembly: AssemblyInformationalVersion("0.4.1-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Properties/AssemblyInfo.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Properties/AssemblyInfo.cs
index 8938a59c5..4257ee04f 100644
--- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Properties/AssemblyInfo.cs
+++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Properties/AssemblyInfo.cs
@@ -25,5 +25,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.4.1.0")]
-[assembly: AssemblyInformationalVersion("0.4.1-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Analytics.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Analytics.cs
index 50beb147a..70d2a238a 100644
--- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Analytics.cs
+++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Analytics.cs
@@ -5,74 +5,75 @@
namespace Microsoft.Azure.Mobile.Analytics
{
- using System.Linq;
- using iOSAnalytics = iOS.Bindings.MSAnalytics;
+ using System.Linq;
+ using iOSAnalytics = iOS.Bindings.MSAnalytics;
- ///
- /// Analytics feature.
- ///
- public static class Analytics
- {
- ///
- /// Internal SDK property not intended for public use.
- ///
- ///
- /// The Android SDK Analytics bindings type.
- ///
- public static Type BindingType => typeof(iOSAnalytics);
+ ///
+ /// Analytics feature.
+ ///
+ public static class Analytics
+ {
+ ///
+ /// Internal SDK property not intended for public use.
+ ///
+ ///
+ /// The iOS SDK Analytics bindings type.
+ ///
+ [Preserve]
+ public static Type BindingType => typeof(iOSAnalytics);
- ///
- /// Enable or disable Analytics module.
- ///
- public static bool Enabled
- {
+ ///
+ /// Enable or disable Analytics module.
+ ///
+ public static bool Enabled
+ {
get { return iOSAnalytics.IsEnabled(); }
set { iOSAnalytics.SetEnabled(value); }
- }
+ }
- ///
- /// Enable or disable automatic page tracking.
- /// Set this to false to if you plan to call manually.
- ///
- //public static bool AutoPageTrackingEnabled
- //{
- // get { return iOSAnalytics.IsAutoPageTrackingEnabled(); }
- // set { iOSAnalytics.SetAutoPageTrackingEnabled(value); }
- //}
+ ///
+ /// Enable or disable automatic page tracking.
+ /// Set this to false to if you plan to call manually.
+ ///
+ //public static bool AutoPageTrackingEnabled
+ //{
+ // get { return iOSAnalytics.IsAutoPageTrackingEnabled(); }
+ // set { iOSAnalytics.SetAutoPageTrackingEnabled(value); }
+ //}
- ///
- /// Track a custom event.
- ///
- /// An event name.
- /// Optional properties.
- public static void TrackEvent(string name, [Optional] IDictionary properties)
- {
- if (properties != null)
- {
- iOSAnalytics.TrackEvent(name, StringDictToNSDict(properties));
- return;
- }
- iOSAnalytics.TrackEvent(name);
- }
+ ///
+ /// Track a custom event.
+ ///
+ /// An event name.
+ /// Optional properties.
+ public static void TrackEvent(string name, [Optional] IDictionary properties)
+ {
+ if (properties != null)
+ {
+ iOSAnalytics.TrackEvent(name, StringDictToNSDict(properties));
+ return;
+ }
+ iOSAnalytics.TrackEvent(name);
+ }
- /////
- ///// Track a custom page.
- /////
- ///// A page name.
- ///// Optional properties.
- //public static void TrackPage(string name, [Optional] IDictionary properties)
- //{
- // if (properties != null)
- // {
- // iOSAnalytics.TrackPage(name, StringDictToNSDict(properties));
- // return;
- // }
- // iOSAnalytics.TrackPage(name);
- //}
+ /////
+ ///// Track a custom page.
+ /////
+ ///// A page name.
+ ///// Optional properties.
+ //public static void TrackPage(string name, [Optional] IDictionary properties)
+ //{
+ // if (properties != null)
+ // {
+ // iOSAnalytics.TrackPage(name, StringDictToNSDict(properties));
+ // return;
+ // }
+ // iOSAnalytics.TrackPage(name);
+ //}
- private static NSDictionary StringDictToNSDict(IDictionary dict)
- {
- return NSDictionary.FromObjectsAndKeys(dict.Values.ToArray(), dict.Keys.ToArray());
- }
- }
+ private static NSDictionary StringDictToNSDict(IDictionary dict)
+ {
+ return NSDictionary.FromObjectsAndKeys(dict.Values.ToArray(), dict.Keys.ToArray());
+ }
+ }
}
diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Properties/AssemblyInfo.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Properties/AssemblyInfo.cs
index 9b226f0f6..190e78d7b 100644
--- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Properties/AssemblyInfo.cs
+++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Properties/AssemblyInfo.cs
@@ -24,5 +24,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.4.1.0")]
-[assembly: AssemblyInformationalVersion("0.4.1-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Properties/AssemblyInfo.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Properties/AssemblyInfo.cs
index 284956008..e845118aa 100644
--- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Properties/AssemblyInfo.cs
+++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Properties/AssemblyInfo.cs
@@ -25,5 +25,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.4.1.0")]
-[assembly: AssemblyInformationalVersion("0.4.1-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/PlatformCrashes.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/PlatformCrashes.cs
index 48cf0508a..22f6026a4 100644
--- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/PlatformCrashes.cs
+++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/PlatformCrashes.cs
@@ -184,7 +184,7 @@ private static IList GenerateModelStackFrames(StackTrace stackT
return modelFrames;
}
- private class CrashListener : Java.Lang.Object, AndroidCrashes.IWrapperSdkListener
+ class CrashListener : Java.Lang.Object, AndroidCrashes.IWrapperSdkListener
{
public void OnCrashCaptured(AndroidManagedErrorLog errorLog)
{
diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/Properties/AssemblyInfo.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/Properties/AssemblyInfo.cs
index 4198244f4..b31b4704b 100644
--- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/Properties/AssemblyInfo.cs
+++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/Properties/AssemblyInfo.cs
@@ -25,5 +25,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.4.1.0")]
-[assembly: AssemblyInformationalVersion("0.4.1-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS.Bindings/Extensions.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS.Bindings/Extensions.cs
index 12e34a100..58582a058 100644
--- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS.Bindings/Extensions.cs
+++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS.Bindings/Extensions.cs
@@ -15,6 +15,7 @@ public class CrashesInitializationDelegate : MSWrapperCrashesInitializationDeleg
private enum Signal
{
+ SIGFPE = 8,
SIGBUS = 10,
SIGSEGV = 11
}
@@ -33,19 +34,26 @@ public override bool SetUpCrashHandlers()
/* Allocate space to store the Mono handlers */
IntPtr sigbus = Marshal.AllocHGlobal(512);
IntPtr sigsegv = Marshal.AllocHGlobal(512);
+ IntPtr sigfpe = Marshal.AllocHGlobal(512);
- /* Store Mono's SIGSEGV and SIGBUS handlers */
+ /* Store Mono's SIGSEGV, SIGBUS, and SIGFPE handlers */
sigaction(Signal.SIGBUS, IntPtr.Zero, sigbus);
sigaction(Signal.SIGSEGV, IntPtr.Zero, sigsegv);
+ sigaction(Signal.SIGFPE, IntPtr.Zero, sigfpe);
/* Enable native SDK crash reporting library */
MSWrapperExceptionManager.StartCrashReportingFromWrapperSdk();
- /* Restore Mono SIGSEGV and SIGBUS handlers */
+ /* Restore Mono SIGSEGV, SIGBUS, and SIGFPE handlers */
sigaction(Signal.SIGBUS, sigbus, IntPtr.Zero);
sigaction(Signal.SIGSEGV, sigsegv, IntPtr.Zero);
+ sigaction(Signal.SIGFPE, sigfpe, IntPtr.Zero);
+
+ /* Release previously allocated space */
Marshal.FreeHGlobal(sigbus);
Marshal.FreeHGlobal(sigsegv);
+ Marshal.FreeHGlobal(sigfpe);
+
return true;
}
}
diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/PlatformCrashes.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/PlatformCrashes.cs
index e2d8e54c0..94206cf48 100644
--- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/PlatformCrashes.cs
+++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/PlatformCrashes.cs
@@ -5,7 +5,6 @@
using Microsoft.Azure.Mobile.Crashes.iOS.Bindings;
using Foundation;
using System.Text.RegularExpressions;
-using Microsoft.Azure.Mobile.Crashes.iOS.Bindings;
namespace Microsoft.Azure.Mobile.Crashes
{
diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/Properties/AssemblyInfo.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/Properties/AssemblyInfo.cs
index 22d5c24f0..c20a78a82 100644
--- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/Properties/AssemblyInfo.cs
+++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/Properties/AssemblyInfo.cs
@@ -24,5 +24,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.4.1.0")]
-[assembly: AssemblyInformationalVersion("0.4.1-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/Properties/AssemblyInfo.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/Properties/AssemblyInfo.cs
index 3eb78afc0..967eb7e3b 100644
--- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/Properties/AssemblyInfo.cs
+++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/Properties/AssemblyInfo.cs
@@ -25,5 +25,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
-[assembly: AssemblyFileVersion("0.4.1.0")]
-[assembly: AssemblyInformationalVersion("0.4.1-SNAPSHOT")]
+[assembly: AssemblyFileVersion("0.5.0.0")]
+[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
diff --git a/Tests/Contoso.Forms.Test.Strings/Contoso.Forms.Test.Strings.projitems b/Tests/Contoso.Forms.Test.Strings/Contoso.Forms.Test.Strings.projitems
new file mode 100644
index 000000000..1fa609702
--- /dev/null
+++ b/Tests/Contoso.Forms.Test.Strings/Contoso.Forms.Test.Strings.projitems
@@ -0,0 +1,14 @@
+
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+ true
+ {7B6E79A4-FBAF-4E7E-B696-0AC10D0A2552}
+
+
+ Contoso.Forms.Test.Strings
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/Contoso.Forms.Test.Strings/Contoso.Forms.Test.Strings.shproj b/Tests/Contoso.Forms.Test.Strings/Contoso.Forms.Test.Strings.shproj
new file mode 100644
index 000000000..d610a72a4
--- /dev/null
+++ b/Tests/Contoso.Forms.Test.Strings/Contoso.Forms.Test.Strings.shproj
@@ -0,0 +1,11 @@
+
+
+
+ {7B6E79A4-FBAF-4E7E-B696-0AC10D0A2552}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/Contoso.Forms.Test.Strings/Strings.cs b/Tests/Contoso.Forms.Test.Strings/Strings.cs
new file mode 100644
index 000000000..f35f4d551
--- /dev/null
+++ b/Tests/Contoso.Forms.Test.Strings/Strings.cs
@@ -0,0 +1,94 @@
+namespace Contoso.Forms.Test
+{
+ public static class TestStrings
+ {
+ /* General */
+ /* Automation Ids */
+ public static readonly string DismissButton = "DismissButton";
+
+ /* TestPage */
+ /* Automation Ids */
+ public static readonly string GoToTogglePageButton = "GoToTogglePageButton";
+ public static readonly string GoToCrashesPageButton = "GoToCrashesPageButton";
+ public static readonly string GoToAnalyticsPageButton = "GoToAnalyticsPageButton";
+ public static readonly string GoToCrashResultsPageButton = "GoToCrashResultsPageButton";
+
+ /* ToggleStatesPage */
+ /* Automation Ids */
+ public static readonly string EnableMobileCenterButton = "EnableMobileCenterButton";
+ public static readonly string EnableAnalyticsButton = "EnableAnalyticsButton";
+ public static readonly string EnableCrashesButton = "EnableCrashesButton";
+ public static readonly string DisableMobileCenterButton = "DisableMobileCenterButton";
+ public static readonly string DisableCrashesButton = "DisableCrashesButton";
+ public static readonly string DisableAnalyticsButton = "DisableAnalyticsButton";
+ public static readonly string MobileCenterEnabledLabel = "MobileCenterEnabledLabel";
+ public static readonly string AnalyticsEnabledLabel = "AnalyticsEnabledLabel";
+ public static readonly string CrashesEnabledLabel = "CrashesEnabledLabel";
+
+ /* Text values */
+ public static readonly string MobileCenterEnabledText = "Mobile Center enabled";
+ public static readonly string MobileCenterDisabledText = "Mobile Center disabled";
+ public static readonly string AnalyticsEnabledText = "Analytics enabled";
+ public static readonly string AnalyticsDisabledText = "Analytics disabled";
+ public static readonly string CrashesEnabledText = "Crashes enabled";
+ public static readonly string CrashesDisabledText = "Crashes disabled";
+
+ /* CrashesPage */
+ /* Automation Ids */
+ public static readonly string DivideByZeroCrashButton = "DivideByZeroCrashButton";
+ public static readonly string GenerateTestCrashButton = "GenerateTestCrashButton";
+ public static readonly string CatchNullReferenceButton = "CatchNullReferenceButton";
+ public static readonly string CrashWithAggregateExceptionButton = "CrashWithAggregateExceptionButton";
+ public static readonly string CrashInsideAsyncTaskButton = "CrashInsideAsyncTaskButton";
+ public static readonly string CrashWithInvalidOperationButton = "CrashWithInvalidOperationButton";
+
+ /* CrashResultsPage */
+ /* Automation Ids */
+ public static readonly string HasCrashedInLastSessionLabel = "HasCrashedInLastSessionLabel";
+ public static readonly string SendingErrorReportLabel = "SendingErrorReportLabel";
+ public static readonly string SentErrorReportLabel = "SentErrorReportLabel";
+ public static readonly string FailedToSendErrorReportLabel = "FailedToSendErrorReportLabel";
+ public static readonly string ShouldProcessErrorReportLabel = "ShouldProcessErrorReportLabel";
+ public static readonly string ShouldAwaitUserConfirmationLabel = "ShouldAwaitUserConfirmationLabel";
+ public static readonly string GetErrorAttachmentLabel = "GetErrorAttachmentLabel";
+ public static readonly string ViewLastSessionErrorReportButton = "ViewLastSessionErrorReportButton";
+
+ /* Text values */
+ public static readonly string HasCrashedInLastSessionText = "HasCrashedInLastSession == true";
+ public static readonly string HasNotCrashedInLastSessionText = "HasCrashedInLastSession == false";
+ public static readonly string DidSendingErrorReportText = "SendingErrorReport has occured";
+ public static readonly string DidNotSendingErrorReportText = "SendingErrorReport has not occured";
+ public static readonly string DidSentErrorReportText = "SentErrorReport has occured";
+ public static readonly string DidNotSentErrorReportText = "SentErrorReport has not occured";
+ public static readonly string DidFailedToSendErrorReportText = "FailedToSendErrorReport has occured";
+ public static readonly string DidNotFailedToSendErrorReportText = "FailedToSendErrorReport has not occured";
+ public static readonly string DidShouldProcessErrorReportText = "ShouldProcessErrorReport has occured";
+ public static readonly string DidNotShouldProcessErrorReportText = "ShouldProcessErrorReport has not occured";
+ public static readonly string DidShouldAwaitUserConfirmationText = "ShouldAwaitUserConfirmation has occured";
+ public static readonly string DidNotShouldAwaitUserConfirmationText = "ShouldAwaitUserConfirmation has not occured";
+ public static readonly string DidGetErrorAttachmentText = "GetErrorAttachment has occured";
+ public static readonly string DidNotGetErrorAttachmentText = "GetErrorAttachment has not occured";
+
+ /* LastSessionErrorReportPage */
+ /* Automation Ids */
+ public static readonly string ExceptionTypeLabel = "ExceptionTypeLabel";
+ public static readonly string ExceptionMessageLabel = "ExceptionMessageLabel";
+ public static readonly string AppStartTimeLabel = "AppStartTimeLabel";
+ public static readonly string AppErrorTimeLabel = "AppErrorTimeLabel";
+ public static readonly string IdLabel = "IdLabel";
+ public static readonly string DeviceLabel = "DeviceLabel";
+ public static readonly string AndroidDetailsLabel = "AndroidDetailsLabel";
+ public static readonly string iOSDetailsLabel = "iOSDetailsLabel";
+
+ /* Text values */
+ public static readonly string DeviceReportedText = "Device reported";
+ public static readonly string HasiOSDetailsText = "Has iOS details";
+ public static readonly string HasAndroidDetailsText = "Has Android details";
+
+ /* AnalyticsPage */
+ /* Automation Ids */
+ public static readonly string SendEventButton = "SendEventButton";
+ public static readonly string AddPropertyButton = "AddPropertyButton";
+ public static readonly string ClearPropertiesButton = "ClearPropertiesButton";
+ }
+}
diff --git a/Tests/Contoso.Forms.Test/App.xaml b/Tests/Contoso.Forms.Test/App.xaml
new file mode 100644
index 000000000..35d088d69
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/App.xaml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Tests/Contoso.Forms.Test/App.xaml.cs b/Tests/Contoso.Forms.Test/App.xaml.cs
new file mode 100644
index 000000000..78f56a1fc
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/App.xaml.cs
@@ -0,0 +1,44 @@
+using Xamarin.Forms;
+using Microsoft.Azure.Mobile;
+using Microsoft.Azure.Mobile.Analytics;
+using Microsoft.Azure.Mobile.Crashes;
+
+namespace Contoso.Forms.Test
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ InitializeComponent();
+ TestPage testPage = new TestPage();
+
+ /* Set crash callbacks and events */
+ Crashes.ShouldProcessErrorReport = testPage.ResultsPage.ShouldProcessErrorReport;
+ Crashes.ShouldAwaitUserConfirmation = testPage.ResultsPage.ShouldAwaitUserConfirmation;
+ Crashes.GetErrorAttachment = testPage.ResultsPage.GetErrorAttachment;
+ Crashes.SendingErrorReport += testPage.ResultsPage.SendingErrorReport;
+ Crashes.SentErrorReport += testPage.ResultsPage.SentErrorReport;
+ Crashes.FailedToSendErrorReport += testPage.ResultsPage.FailedToSendErrorReport;
+
+ /* Start Mobile Center */
+ MobileCenter.LogLevel = LogLevel.Verbose;
+ MobileCenter.Start(typeof(Analytics), typeof(Crashes));
+ MainPage = testPage;
+ }
+
+ protected override void OnStart()
+ {
+ // Handle when your app starts
+ }
+
+ protected override void OnSleep()
+ {
+ // Handle when your app sleeps
+ }
+
+ protected override void OnResume()
+ {
+ // Handle when your app resumes
+ }
+ }
+}
diff --git a/Tests/Contoso.Forms.Test/Contoso.Forms.Test.csproj b/Tests/Contoso.Forms.Test/Contoso.Forms.Test.csproj
new file mode 100644
index 000000000..1298715f7
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Contoso.Forms.Test.csproj
@@ -0,0 +1,104 @@
+
+
+ Debug
+ AnyCPU
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}
+ {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ true
+ Library
+ Contoso.Forms.Test
+ Contoso.Forms.Test
+ v4.5
+ Profile259
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+
+
+ true
+ bin\Release
+ prompt
+ 4
+
+
+
+
+ MSBuild:UpdateDesignTimeXaml
+
+
+ MSBuild:UpdateDesignTimeXaml
+
+
+ MSBuild:UpdateDesignTimeXaml
+
+
+ MSBuild:UpdateDesignTimeXaml
+
+
+ MSBuild:UpdateDesignTimeXaml
+
+
+ MSBuild:UpdateDesignTimeXaml
+
+
+
+
+ App.xaml
+
+
+
+ TestPage.xaml
+
+
+ AnalyticsPage.xaml
+
+
+ CrashesPage.xaml
+
+
+ ToggleStatesPage.xaml
+
+
+ CrashResultsPage.xaml
+
+
+ LastSessionErrorReportPage.xaml
+
+
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Core.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Platform.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Xaml.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.0.5.0-r0003-1ca4f82\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Microsoft.Azure.Mobile.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.Analytics.0.5.0-r0003-1ca4f82\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Microsoft.Azure.Mobile.Analytics.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.Crashes.0.5.0-r0003-1ca4f82\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Microsoft.Azure.Mobile.Crashes.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/Contoso.Forms.Test/Module Pages/AnalyticsPage.xaml b/Tests/Contoso.Forms.Test/Module Pages/AnalyticsPage.xaml
new file mode 100644
index 000000000..8a9018981
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Module Pages/AnalyticsPage.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/Contoso.Forms.Test/Module Pages/AnalyticsPage.xaml.cs b/Tests/Contoso.Forms.Test/Module Pages/AnalyticsPage.xaml.cs
new file mode 100644
index 000000000..db3a01adf
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Module Pages/AnalyticsPage.xaml.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+using Microsoft.Azure.Mobile.Analytics;
+using Microsoft.Azure.Mobile;
+
+namespace Contoso.Forms.Test
+{
+ public partial class AnalyticsPage : ContentPage
+ {
+ Dictionary EventProperties = new Dictionary();
+
+ public AnalyticsPage()
+ {
+ InitializeComponent();
+ }
+
+ void DismissPage(object sender, EventArgs e)
+ {
+ Navigation.PopModalAsync();
+ }
+
+ void SendEvent(object sender, EventArgs e)
+ {
+ string name = "UITest Event";
+ if (EventProperties.Count == 0)
+ {
+ Analytics.TrackEvent(name);
+ }
+ else
+ {
+ Analytics.TrackEvent(name, EventProperties);
+ }
+ }
+
+ void AddProperty(object sender, EventArgs e)
+ {
+ string propertyName = "property number " + EventProperties.Count;
+ string propertyValue = "value for " + propertyName;
+ EventProperties.Add(propertyName, propertyValue);
+ }
+
+ void ClearProperties(object sender, EventArgs e)
+ {
+ EventProperties.Clear();
+ }
+ }
+}
diff --git a/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/CrashResultsPage.xaml b/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/CrashResultsPage.xaml
new file mode 100644
index 000000000..d9d1e8a65
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/CrashResultsPage.xaml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/CrashResultsPage.xaml.cs b/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/CrashResultsPage.xaml.cs
new file mode 100644
index 000000000..563098f9d
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/CrashResultsPage.xaml.cs
@@ -0,0 +1,157 @@
+using Microsoft.Azure.Mobile.Crashes;
+using Xamarin.Forms;
+
+namespace Contoso.Forms.Test
+{
+ public partial class CrashResultsPage : ContentPage
+ {
+ public CrashResultsPage()
+ {
+ InitializeComponent();
+ InitializeText();
+ }
+
+ protected override void OnAppearing()
+ {
+ base.OnAppearing();
+
+ if (HasCrashedInLastSessionLabel != null)
+ {
+ if (Crashes.HasCrashedInLastSession)
+ {
+ HasCrashedInLastSessionLabel.Text = TestStrings.HasCrashedInLastSessionText;
+ }
+ else
+ {
+ HasCrashedInLastSessionLabel.Text = TestStrings.HasNotCrashedInLastSessionText;
+ }
+ }
+ }
+
+ void DismissPage(object sender, System.EventArgs e)
+ {
+ Navigation.PopModalAsync();
+ }
+
+ void ViewLastSessionErrorReport(object sender, System.EventArgs e)
+ {
+ Navigation.PushModalAsync(new LastSessionErrorReportPage());
+ }
+
+ public void SendingErrorReport(object sender, SendingErrorReportEventArgs e)
+ {
+ Device.BeginInvokeOnMainThread(() =>
+ {
+ if (SendingErrorReportLabel != null)
+ {
+ SendingErrorReportLabel.Text = TestStrings.DidSendingErrorReportText;
+ }
+ });
+
+ }
+
+ public void SentErrorReport(object sender, SentErrorReportEventArgs e)
+ {
+ Device.BeginInvokeOnMainThread(() =>
+ {
+ if (SentErrorReportLabel != null)
+ {
+ SentErrorReportLabel.Text = TestStrings.DidSentErrorReportText;
+ }
+ });
+ }
+
+ public void FailedToSendErrorReport(object sender, FailedToSendErrorReportEventArgs e)
+ {
+ Device.BeginInvokeOnMainThread(() =>
+ {
+ if (FailedToSendErrorReportLabel != null)
+ {
+ FailedToSendErrorReportLabel.Text = TestStrings.DidFailedToSendErrorReportText;
+ }
+ });
+ }
+
+ public ErrorAttachment GetErrorAttachment(ErrorReport report)
+ {
+ Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
+ {
+ if (GetErrorAttachmentLabel != null)
+ {
+ GetErrorAttachmentLabel.Text = TestStrings.DidGetErrorAttachmentText;
+ }
+ });
+ return ErrorAttachment.AttachmentWithText("hello");
+ }
+
+ public bool ShouldProcessErrorReport(ErrorReport report)
+ {
+ Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
+ {
+ if (ShouldProcessErrorReportLabel != null)
+ {
+ ShouldProcessErrorReportLabel.Text = TestStrings.DidShouldProcessErrorReportText;
+ }
+ });
+
+ return true;
+ }
+
+ public bool ShouldAwaitUserConfirmation()
+ {
+ Device.BeginInvokeOnMainThread(() =>
+ {
+ if (ShouldAwaitUserConfirmationLabel != null)
+ {
+ ShouldAwaitUserConfirmationLabel.Text = TestStrings.DidShouldAwaitUserConfirmationText;
+ }
+ });
+ return false;
+ }
+
+ public void InitializeText()
+ {
+ if (HasCrashedInLastSessionLabel != null)
+ {
+ if (Crashes.HasCrashedInLastSession)
+ {
+ HasCrashedInLastSessionLabel.Text = TestStrings.HasCrashedInLastSessionText;
+ }
+ else
+ {
+ HasCrashedInLastSessionLabel.Text = TestStrings.HasNotCrashedInLastSessionText;
+ }
+ }
+
+ if (SendingErrorReportLabel != null)
+ {
+ SendingErrorReportLabel.Text = TestStrings.DidNotSendingErrorReportText;
+ }
+
+ if (SentErrorReportLabel != null)
+ {
+ SentErrorReportLabel.Text = TestStrings.DidNotSentErrorReportText;
+ }
+
+ if (FailedToSendErrorReportLabel != null)
+ {
+ FailedToSendErrorReportLabel.Text = TestStrings.DidNotFailedToSendErrorReportText;
+ }
+
+ if (GetErrorAttachmentLabel != null)
+ {
+ GetErrorAttachmentLabel.Text = TestStrings.DidNotGetErrorAttachmentText;
+ }
+
+ if (ShouldProcessErrorReportLabel != null)
+ {
+ ShouldProcessErrorReportLabel.Text = TestStrings.DidNotShouldProcessErrorReportText;
+ }
+
+ if (ShouldAwaitUserConfirmationLabel != null)
+ {
+ ShouldAwaitUserConfirmationLabel.Text = TestStrings.DidNotShouldAwaitUserConfirmationText;
+ }
+ }
+ }
+}
diff --git a/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/LastSessionErrorReportPage.xaml b/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/LastSessionErrorReportPage.xaml
new file mode 100644
index 000000000..b2d17fbfa
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/LastSessionErrorReportPage.xaml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/LastSessionErrorReportPage.xaml.cs b/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/LastSessionErrorReportPage.xaml.cs
new file mode 100644
index 000000000..287e136aa
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Module Pages/CrashResults Pages/LastSessionErrorReportPage.xaml.cs
@@ -0,0 +1,71 @@
+using Microsoft.Azure.Mobile.Crashes;
+using Xamarin.Forms;
+
+namespace Contoso.Forms.Test
+{
+ public partial class LastSessionErrorReportPage : ContentPage
+ {
+ public LastSessionErrorReportPage()
+ {
+ InitializeComponent();
+ Device.BeginInvokeOnMainThread(() =>
+ {
+ UpdateLabels();
+ });
+ }
+
+ protected override void OnAppearing()
+ {
+ base.OnAppearing();
+ UpdateLabels();
+ }
+
+ void DismissPage(object sender, System.EventArgs e)
+ {
+ Navigation.PopModalAsync();
+ }
+
+ void UpdateLabels()
+ {
+ if (ExceptionTypeLabel != null)
+ {
+ ExceptionTypeLabel.Text = Crashes.LastSessionCrashReport?.Exception?.GetType().Name;
+ }
+
+ if (ExceptionMessageLabel != null)
+ {
+ ExceptionMessageLabel.Text = Crashes.LastSessionCrashReport?.Exception?.Message;
+ }
+
+ if (AppStartTimeLabel != null && Crashes.LastSessionCrashReport?.AppStartTime != null)
+ {
+ AppStartTimeLabel.Text = Crashes.LastSessionCrashReport.AppStartTime.ToString();
+ }
+
+ if (AppErrorTimeLabel != null && Crashes.LastSessionCrashReport?.AppErrorTime != null)
+ {
+ AppErrorTimeLabel.Text = Crashes.LastSessionCrashReport.AppErrorTime.ToString();
+ }
+
+ if (IdLabel != null)
+ {
+ IdLabel.Text = Crashes.LastSessionCrashReport?.Id;
+ }
+
+ if (DeviceLabel != null && Crashes.LastSessionCrashReport?.Device != null)
+ {
+ DeviceLabel.Text = TestStrings.DeviceReportedText;
+ }
+
+ if (iOSDetailsLabel != null && Crashes.LastSessionCrashReport?.iOSDetails != null)
+ {
+ iOSDetailsLabel.Text = TestStrings.HasiOSDetailsText;
+ }
+
+ if (AndroidDetailsLabel != null && Crashes.LastSessionCrashReport?.AndroidDetails != null)
+ {
+ AndroidDetailsLabel.Text = TestStrings.HasAndroidDetailsText;
+ }
+ }
+ }
+}
diff --git a/Tests/Contoso.Forms.Test/Module Pages/CrashesPage.xaml b/Tests/Contoso.Forms.Test/Module Pages/CrashesPage.xaml
new file mode 100644
index 000000000..41438a0fe
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Module Pages/CrashesPage.xaml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/Contoso.Forms.Test/Module Pages/CrashesPage.xaml.cs b/Tests/Contoso.Forms.Test/Module Pages/CrashesPage.xaml.cs
new file mode 100644
index 000000000..724b74201
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Module Pages/CrashesPage.xaml.cs
@@ -0,0 +1,117 @@
+using System;
+using Microsoft.Azure.Mobile.Crashes;
+using System.Threading.Tasks;
+using Xamarin.Forms;
+using System.IO;
+using System.Linq;
+
+namespace Contoso.Forms.Test
+{
+ public partial class CrashesPage : ContentPage
+ {
+ public CrashesPage()
+ {
+ InitializeComponent();
+ }
+
+ void DismissPage(object sender, System.EventArgs e)
+ {
+ Navigation.PopModalAsync();
+ }
+
+ void DivideByZeroCrash(object sender, System.EventArgs e)
+ {
+ #pragma warning disable CS0219
+ int x = (42 / int.Parse("0"));
+ #pragma warning restore CS0219
+ }
+
+ void GenerateTestCrash(object sender, System.EventArgs e)
+ {
+ Crashes.GenerateTestCrash();
+ }
+
+ void CrashWithInvalidOperation(object sender, EventArgs e)
+ {
+ string[] strings = { "A", "B", "C" };
+ #pragma warning disable CS0219
+ string s = strings.First((arg) => { return arg == "6"; });
+ #pragma warning restore CS0219
+ }
+
+ void CatchNullReferenceException(object sender, EventArgs e)
+ {
+ try
+ {
+ TriggerNullReferenceException();
+ }
+ catch (NullReferenceException)
+ {
+ System.Diagnostics.Debug.WriteLine("null reference exception");
+ }
+ }
+
+ private void CrashWithAggregateException(object sender, EventArgs e)
+ {
+ throw PrepareException();
+ }
+
+ private static Exception PrepareException()
+ {
+ try
+ {
+ throw new AggregateException(SendHttp(), new ArgumentException("Invalid parameter", ValidateLength()));
+ }
+ catch (Exception e)
+ {
+ return e;
+ }
+ }
+
+ private static Exception SendHttp()
+ {
+ try
+ {
+ throw new IOException("Network down");
+ }
+ catch (Exception e)
+ {
+ return e;
+ }
+ }
+
+ private static Exception ValidateLength()
+ {
+ try
+ {
+ throw new ArgumentOutOfRangeException(null, "It's over 9000!");
+ }
+ catch (Exception e)
+ {
+ return e;
+ }
+ }
+
+ public async void CrashAsync(object sender, EventArgs e)
+ {
+ await FakeService.DoStuffInBackground();
+ }
+
+ void TriggerNullReferenceException()
+ {
+ string[] values = { "one", null, "two" };
+ for (int ctr = 0; ctr <= values.GetUpperBound(0); ctr++)
+ System.Diagnostics.Debug.WriteLine("{0}{1}", values[ctr].Trim(),
+ ctr == values.GetUpperBound(0) ? "" : ", ");
+ System.Diagnostics.Debug.WriteLine("");
+ }
+ }
+
+ static class FakeService
+ {
+ internal async static Task DoStuffInBackground()
+ {
+ await Task.Run(() => { throw new IOException("Server did not respond"); });
+ }
+ }
+}
diff --git a/Tests/Contoso.Forms.Test/Module Pages/ToggleStatesPage.xaml b/Tests/Contoso.Forms.Test/Module Pages/ToggleStatesPage.xaml
new file mode 100644
index 000000000..e4e5ac96d
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Module Pages/ToggleStatesPage.xaml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/Contoso.Forms.Test/Module Pages/ToggleStatesPage.xaml.cs b/Tests/Contoso.Forms.Test/Module Pages/ToggleStatesPage.xaml.cs
new file mode 100644
index 000000000..e8fa2f0fe
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Module Pages/ToggleStatesPage.xaml.cs
@@ -0,0 +1,89 @@
+using Microsoft.Azure.Mobile.Analytics;
+using Microsoft.Azure.Mobile.Crashes;
+using Microsoft.Azure.Mobile;
+
+using Xamarin.Forms;
+
+namespace Contoso.Forms.Test
+{
+ public partial class ToggleStatesPage : ContentPage
+ {
+ public ToggleStatesPage()
+ {
+ InitializeComponent();
+ UpdateEnabledStateLabels();
+ }
+
+ void EnableMobileCenter(object sender, System.EventArgs e)
+ {
+ MobileCenter.Enabled = true;
+ UpdateEnabledStateLabels();
+ }
+
+ void EnableCrashes(object sender, System.EventArgs e)
+ {
+ Crashes.Enabled = true;
+ UpdateEnabledStateLabels();
+ }
+
+ void EnableAnalytics(object sender, System.EventArgs e)
+ {
+ Analytics.Enabled = true;
+ UpdateEnabledStateLabels();
+ }
+
+ void DisableMobileCenter(object sender, System.EventArgs e)
+ {
+ MobileCenter.Enabled = false;
+ UpdateEnabledStateLabels();
+ }
+
+ void DisableCrashes(object sender, System.EventArgs e)
+ {
+ Crashes.Enabled = false;
+ UpdateEnabledStateLabels();
+ }
+
+ void DisableAnalytics(object sender, System.EventArgs e)
+ {
+ Analytics.Enabled = false;
+ UpdateEnabledStateLabels();
+ }
+
+ void UpdateEnabledStateLabels()
+ {
+ UpdateMobileCenterLabel();
+ UpdateCrashesLabel();
+ UpdateAnalyticsLabel();
+ }
+
+ void UpdateCrashesLabel()
+ {
+ if (CrashesEnabledLabel != null)
+ {
+ CrashesEnabledLabel.Text = Crashes.Enabled ? TestStrings.CrashesEnabledText : TestStrings.CrashesDisabledText;
+ }
+ }
+
+ void UpdateAnalyticsLabel()
+ {
+ if (AnalyticsEnabledLabel != null)
+ {
+ AnalyticsEnabledLabel.Text = Analytics.Enabled ? TestStrings.AnalyticsEnabledText : TestStrings.AnalyticsDisabledText;
+ }
+ }
+
+ void UpdateMobileCenterLabel()
+ {
+ if (MobileCenterEnabledLabel != null)
+ {
+ MobileCenterEnabledLabel.Text = MobileCenter.Enabled ? TestStrings.MobileCenterEnabledText : TestStrings.MobileCenterDisabledText;
+ }
+ }
+
+ void DismissPage(object sender, System.EventArgs e)
+ {
+ Navigation.PopModalAsync();
+ }
+ }
+}
diff --git a/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs b/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..2a59366f6
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs
@@ -0,0 +1,26 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Contoso.Forms.Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("0.0.0.0")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
diff --git a/Tests/Contoso.Forms.Test/TestPage.xaml b/Tests/Contoso.Forms.Test/TestPage.xaml
new file mode 100644
index 000000000..19bc6e25f
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/TestPage.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/Contoso.Forms.Test/TestPage.xaml.cs b/Tests/Contoso.Forms.Test/TestPage.xaml.cs
new file mode 100644
index 000000000..f9cbd0d19
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/TestPage.xaml.cs
@@ -0,0 +1,35 @@
+using Xamarin.Forms;
+
+namespace Contoso.Forms.Test
+{
+ public partial class TestPage : ContentPage
+ {
+ /* CrashResultsPage must persist so that it can subscribe to the crash callbacks */
+ public CrashResultsPage ResultsPage = new CrashResultsPage();
+
+ public TestPage()
+ {
+ InitializeComponent();
+ }
+
+ public void GoToTogglePage(object sender, System.EventArgs e)
+ {
+ Navigation.PushModalAsync(new ToggleStatesPage());
+ }
+
+ public void GoToCrashesPage(object sender, System.EventArgs e)
+ {
+ Navigation.PushModalAsync(new CrashesPage());
+ }
+
+ public void GoToAnalyticsPage(object sender, System.EventArgs e)
+ {
+ Navigation.PushModalAsync(new AnalyticsPage());
+ }
+
+ public void GoToCrashResultsPage(object sender, System.EventArgs e)
+ {
+ Navigation.PushModalAsync(ResultsPage);
+ }
+ }
+}
diff --git a/Tests/Contoso.Forms.Test/packages.config b/Tests/Contoso.Forms.Test/packages.config
new file mode 100644
index 000000000..7b350bf29
--- /dev/null
+++ b/Tests/Contoso.Forms.Test/packages.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/Droid/Assets/AboutAssets.txt b/Tests/Droid/Assets/AboutAssets.txt
new file mode 100644
index 000000000..a9b0638eb
--- /dev/null
+++ b/Tests/Droid/Assets/AboutAssets.txt
@@ -0,0 +1,19 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories) and given a Build Action of "AndroidAsset".
+
+These files will be deployed with your package and will be accessible using Android's
+AssetManager, like this:
+
+public class ReadAsset : Activity
+{
+ protected override void OnCreate (Bundle bundle)
+ {
+ base.OnCreate (bundle);
+
+ InputStream input = Assets.Open ("my_asset.txt");
+ }
+}
+
+Additionally, some Android functions will automatically load asset files:
+
+Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
diff --git a/Tests/Droid/Contoso.Forms.Test.Droid.csproj b/Tests/Droid/Contoso.Forms.Test.Droid.csproj
new file mode 100644
index 000000000..97503140e
--- /dev/null
+++ b/Tests/Droid/Contoso.Forms.Test.Droid.csproj
@@ -0,0 +1,135 @@
+
+
+
+ Debug
+ AnyCPU
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}
+ {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Library
+ Contoso.Forms.Test.Droid
+ Contoso.Forms.Test.Droid
+ v7.0
+ True
+ Resources\Resource.designer.cs
+ Resource
+ Properties\AndroidManifest.xml
+ Resources
+ Assets
+ true
+ false
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+ None
+ armeabi-v7a;x86;arm64-v8a;x86_64;armeabi
+ true
+
+
+ true
+ pdbonly
+ true
+ bin\Release
+ prompt
+ 4
+ true
+ x86;x86_64;armeabi;armeabi-v7a;arm64-v8a
+
+
+
+
+
+
+
+ ..\..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
+
+
+ ..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll
+
+
+ ..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll
+
+
+ ..\..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll
+
+
+ ..\..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll
+
+
+ ..\..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll
+
+
+ ..\..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll
+
+
+ ..\..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\MonoAndroid10\FormsViewGroup.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\MonoAndroid10\Xamarin.Forms.Core.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.0.5.0-r0003-1ca4f82\lib\MonoAndroid403\Microsoft.Azure.Mobile.Android.Bindings.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.0.5.0-r0003-1ca4f82\lib\MonoAndroid403\Microsoft.Azure.Mobile.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.Analytics.0.5.0-r0003-1ca4f82\lib\MonoAndroid403\Microsoft.Azure.Mobile.Analytics.Android.Bindings.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.Analytics.0.5.0-r0003-1ca4f82\lib\MonoAndroid403\Microsoft.Azure.Mobile.Analytics.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.Crashes.0.5.0-r0003-1ca4f82\lib\MonoAndroid403\Microsoft.Azure.Mobile.Crashes.Android.Bindings.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.Crashes.0.5.0-r0003-1ca4f82\lib\MonoAndroid403\Microsoft.Azure.Mobile.Crashes.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}
+ Contoso.Forms.Test
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/Droid/MainActivity.cs b/Tests/Droid/MainActivity.cs
new file mode 100644
index 000000000..4e46eb6b5
--- /dev/null
+++ b/Tests/Droid/MainActivity.cs
@@ -0,0 +1,30 @@
+using System;
+using Android.App;
+using Android.Content;
+using Android.Content.PM;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.OS;
+using Microsoft.Azure.Mobile;
+
+namespace Contoso.Forms.Test.Droid
+{
+ [Activity(Label = "Contoso.Forms.Test.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
+ public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
+ {
+ protected override void OnCreate(Bundle bundle)
+ {
+ TabLayoutResource = Resource.Layout.Tabbar;
+ ToolbarResource = Resource.Layout.Toolbar;
+
+ base.OnCreate(bundle);
+
+ global::Xamarin.Forms.Forms.Init(this, bundle);
+
+ MobileCenter.Configure("cc684d08-3240-4eb7-a748-e7ddd846a8b1");
+
+ LoadApplication(new App());
+ }
+ }
+}
diff --git a/Tests/Droid/Properties/AndroidManifest.xml b/Tests/Droid/Properties/AndroidManifest.xml
new file mode 100644
index 000000000..3e1113e9a
--- /dev/null
+++ b/Tests/Droid/Properties/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Tests/Droid/Properties/AssemblyInfo.cs b/Tests/Droid/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..d21f4bb22
--- /dev/null
+++ b/Tests/Droid/Properties/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using Android.App;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Contoso.Forms.Test.Droid")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("0.0.0.0")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
diff --git a/Tests/Droid/Resources/AboutResources.txt b/Tests/Droid/Resources/AboutResources.txt
new file mode 100644
index 000000000..10f52d460
--- /dev/null
+++ b/Tests/Droid/Resources/AboutResources.txt
@@ -0,0 +1,44 @@
+Images, layout descriptions, binary blobs and string dictionaries can be included
+in your application as resource files. Various Android APIs are designed to
+operate on the resource IDs instead of dealing with images, strings or binary blobs
+directly.
+
+For example, a sample Android app that contains a user interface layout (main.axml),
+an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
+would keep its resources in the "Resources" directory of the application:
+
+Resources/
+ drawable/
+ icon.png
+
+ layout/
+ main.axml
+
+ values/
+ strings.xml
+
+In order to get the build system to recognize Android resources, set the build action to
+"AndroidResource". The native Android APIs do not operate directly with filenames, but
+instead operate on resource IDs. When you compile an Android application that uses resources,
+the build system will package the resources for distribution and generate a class called "R"
+(this is an Android convention) that contains the tokens for each one of the resources
+included. For example, for the above Resources layout, this is what the R class would expose:
+
+public class R {
+ public class drawable {
+ public const int icon = 0x123;
+ }
+
+ public class layout {
+ public const int main = 0x456;
+ }
+
+ public class strings {
+ public const int first_string = 0xabc;
+ public const int second_string = 0xbcd;
+ }
+}
+
+You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
+to reference the layout/main.axml file, or R.strings.first_string to reference the first
+string in the dictionary file values/strings.xml.
diff --git a/Tests/Droid/Resources/drawable-hdpi/icon.png b/Tests/Droid/Resources/drawable-hdpi/icon.png
new file mode 100644
index 000000000..964f110ab
Binary files /dev/null and b/Tests/Droid/Resources/drawable-hdpi/icon.png differ
diff --git a/Tests/Droid/Resources/drawable-xhdpi/icon.png b/Tests/Droid/Resources/drawable-xhdpi/icon.png
new file mode 100644
index 000000000..3c01e60ce
Binary files /dev/null and b/Tests/Droid/Resources/drawable-xhdpi/icon.png differ
diff --git a/Tests/Droid/Resources/drawable-xxhdpi/icon.png b/Tests/Droid/Resources/drawable-xxhdpi/icon.png
new file mode 100644
index 000000000..0d8c1c57d
Binary files /dev/null and b/Tests/Droid/Resources/drawable-xxhdpi/icon.png differ
diff --git a/Tests/Droid/Resources/drawable/icon.png b/Tests/Droid/Resources/drawable/icon.png
new file mode 100644
index 000000000..b0ba7150f
Binary files /dev/null and b/Tests/Droid/Resources/drawable/icon.png differ
diff --git a/Tests/Droid/Resources/layout/Tabbar.axml b/Tests/Droid/Resources/layout/Tabbar.axml
new file mode 100644
index 000000000..0bc7e9db6
--- /dev/null
+++ b/Tests/Droid/Resources/layout/Tabbar.axml
@@ -0,0 +1,2 @@
+
+
diff --git a/Tests/Droid/Resources/layout/Toolbar.axml b/Tests/Droid/Resources/layout/Toolbar.axml
new file mode 100644
index 000000000..d685cbadb
--- /dev/null
+++ b/Tests/Droid/Resources/layout/Toolbar.axml
@@ -0,0 +1,2 @@
+
+
diff --git a/Tests/Droid/Resources/values/styles.xml b/Tests/Droid/Resources/values/styles.xml
new file mode 100644
index 000000000..3dc5ef6ba
--- /dev/null
+++ b/Tests/Droid/Resources/values/styles.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
diff --git a/Tests/Droid/packages.config b/Tests/Droid/packages.config
new file mode 100644
index 000000000..7ef863696
--- /dev/null
+++ b/Tests/Droid/packages.config
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/UITests/AppInitializer.cs b/Tests/UITests/AppInitializer.cs
new file mode 100644
index 000000000..791695afd
--- /dev/null
+++ b/Tests/UITests/AppInitializer.cs
@@ -0,0 +1,18 @@
+using Xamarin.UITest;
+using Xamarin.UITest.Configuration;
+
+namespace Contoso.Forms.Test.UITests
+{
+ public class AppInitializer
+ {
+ public static IApp StartApp(Platform platform)
+ {
+ if (platform == Platform.Android)
+ {
+ return ConfigureApp.Android.EnableLocalScreenshots().StartApp(AppDataMode.DoNotClear);
+ }
+
+ return ConfigureApp.iOS.EnableLocalScreenshots().StartApp(AppDataMode.DoNotClear);
+ }
+ }
+}
diff --git a/Tests/UITests/Contoso.Forms.Test.UITests.csproj b/Tests/UITests/Contoso.Forms.Test.UITests.csproj
new file mode 100644
index 000000000..32efd87a0
--- /dev/null
+++ b/Tests/UITests/Contoso.Forms.Test.UITests.csproj
@@ -0,0 +1,61 @@
+
+
+
+ Debug
+ AnyCPU
+ {78990F7A-6C3E-4007-B0E3-A8BF9625A327}
+ Library
+ Contoso.Forms.Test.UITests
+ Contoso.Forms.Test.UITests
+ v4.5
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+
+
+ true
+ bin\Release
+ prompt
+ 4
+
+
+
+
+ ..\..\packages\Xamarin.UITest.2.0.3\lib\Xamarin.UITest.dll
+
+
+ ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
+
+
+
+
+
+
+
+
+
+
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}
+ Contoso.Forms.Test.iOS
+ False
+ False
+
+
+ {64D0912F-65B5-49DC-88B5-D1261B63D6A3}
+ Contoso.Forms.Test.Droid
+ False
+ False
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/UITests/CrashResultsHelper.cs b/Tests/UITests/CrashResultsHelper.cs
new file mode 100644
index 000000000..2e4671092
--- /dev/null
+++ b/Tests/UITests/CrashResultsHelper.cs
@@ -0,0 +1,85 @@
+using System;
+using Xamarin.UITest;
+using NUnit.Framework;
+using Xamarin.UITest.Queries;
+
+namespace Contoso.Forms.Test.UITests
+{
+ public static class CrashResultsHelper
+ {
+ public static IApp app;
+
+ public static bool SendingErrorReportWasCalled
+ {
+ get
+ {
+ return WaitForLabelToSay(TestStrings.SendingErrorReportLabel,
+ TestStrings.DidSendingErrorReportText);
+ }
+ }
+
+ public static bool SentErrorReportWasCalled
+ {
+ get
+ {
+ return WaitForLabelToSay(TestStrings.SentErrorReportLabel,
+ TestStrings.DidSentErrorReportText);
+ }
+ }
+
+ public static bool FailedToSendErrorReportWasCalled
+ {
+ get
+ {
+ return WaitForLabelToSay(TestStrings.FailedToSendErrorReportLabel,
+ TestStrings.DidFailedToSendErrorReportText);
+ }
+ }
+
+ public static bool GetErrorAttachmentWasCalled
+ {
+ get
+ {
+ return WaitForLabelToSay(TestStrings.GetErrorAttachmentLabel,
+ TestStrings.DidGetErrorAttachmentText);
+ }
+ }
+
+ public static bool ShouldProcessErrorReportWasCalled
+ {
+ get
+ {
+ return WaitForLabelToSay(TestStrings.ShouldProcessErrorReportLabel,
+ TestStrings.DidShouldProcessErrorReportText);
+ }
+ }
+
+ public static bool ShouldAwaitUserConfirmationWasCalled
+ {
+ get
+ {
+ return WaitForLabelToSay(TestStrings.ShouldAwaitUserConfirmationLabel,
+ TestStrings.DidShouldAwaitUserConfirmationText);
+ }
+ }
+
+ static bool WaitForLabelToSay(string labelName, string text)
+ {
+ try
+ {
+ app.WaitFor(() =>
+ {
+ AppResult[] results = app.Query(labelName);
+ Assert.IsTrue(results.Length == 1);
+ AppResult label = results[0];
+ return label.Text == text;
+ });
+ }
+ catch (Exception)
+ {
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/Tests/UITests/ServiceStateHelper.cs b/Tests/UITests/ServiceStateHelper.cs
new file mode 100644
index 000000000..e52839e0c
--- /dev/null
+++ b/Tests/UITests/ServiceStateHelper.cs
@@ -0,0 +1,69 @@
+using NUnit.Framework;
+using Xamarin.UITest;
+using Xamarin.UITest.Queries;
+
+namespace Contoso.Forms.Test.UITests
+{
+ public static class ServiceStateHelper
+ {
+ public static IApp app;
+
+ public static bool MobileCenterEnabled
+ {
+ get
+ {
+ return IsPropertyEnabled(TestStrings.MobileCenterEnabledLabel, TestStrings.MobileCenterEnabledText);
+ }
+ set
+ {
+ ToggleProperty(TestStrings.EnableMobileCenterButton, TestStrings.DisableMobileCenterButton, value);
+ }
+ }
+
+ public static bool CrashesEnabled
+ {
+ get
+ {
+ return IsPropertyEnabled(TestStrings.CrashesEnabledLabel, TestStrings.CrashesEnabledText);
+ }
+ set
+ {
+ ToggleProperty(TestStrings.EnableCrashesButton, TestStrings.DisableCrashesButton, value);
+ }
+ }
+
+ public static bool AnalyticsEnabled
+ {
+ get
+ {
+ return IsPropertyEnabled(TestStrings.AnalyticsEnabledLabel, TestStrings.AnalyticsEnabledText);
+ }
+ set
+ {
+ ToggleProperty(TestStrings.EnableAnalyticsButton, TestStrings.DisableAnalyticsButton, value);
+ }
+ }
+
+ static bool IsPropertyEnabled(string elementId, string enabledText)
+ {
+ app.WaitForElement(elementId);
+ AppResult[] results = app.Query(elementId);
+ Assert.IsTrue(results.Length == 1);
+ return results[0].Text == enabledText;
+ }
+
+ static void ToggleProperty(string enableElementId, string disableElementId, bool shouldEnable)
+ {
+ if (shouldEnable)
+ {
+ app.WaitForElement(enableElementId);
+ app.Tap(enableElementId);
+ }
+ else
+ {
+ app.WaitForElement(disableElementId);
+ app.Tap(disableElementId);
+ }
+ }
+ }
+}
diff --git a/Tests/UITests/Tests.cs b/Tests/UITests/Tests.cs
new file mode 100644
index 000000000..8a0ed49f6
--- /dev/null
+++ b/Tests/UITests/Tests.cs
@@ -0,0 +1,93 @@
+using NUnit.Framework;
+using Xamarin.UITest;
+
+namespace Contoso.Forms.Test.UITests
+{
+ [TestFixture(Platform.Android)]
+ [TestFixture(Platform.iOS)]
+ public class Tests
+ {
+ IApp app;
+ Platform platform;
+
+ public Tests(Platform platform)
+ {
+ this.platform = platform;
+ }
+
+ [SetUp]
+ public void BeforeEachTest()
+ {
+ app = AppInitializer.StartApp(platform);
+ }
+
+ [Test]
+ public void TestEnablingAndDisablingServices()
+ {
+ ServiceStateHelper.app = app;
+ app.Tap(TestStrings.GoToTogglePageButton);
+
+ /* Test setting enabling all services */
+ ServiceStateHelper.MobileCenterEnabled = true;
+ Assert.IsTrue(ServiceStateHelper.MobileCenterEnabled);
+ ServiceStateHelper.AnalyticsEnabled = true;
+ Assert.IsTrue(ServiceStateHelper.AnalyticsEnabled);
+ ServiceStateHelper.CrashesEnabled = true;
+ Assert.IsTrue(ServiceStateHelper.CrashesEnabled);
+
+ /* Test that disabling MobileCenter disables everything */
+ ServiceStateHelper.MobileCenterEnabled = false;
+ Assert.IsFalse(ServiceStateHelper.MobileCenterEnabled);
+ Assert.IsFalse(ServiceStateHelper.AnalyticsEnabled);
+ Assert.IsFalse(ServiceStateHelper.CrashesEnabled);
+
+ /* Test disabling individual services */
+ ServiceStateHelper.MobileCenterEnabled = true;
+ Assert.IsTrue(ServiceStateHelper.MobileCenterEnabled);
+ ServiceStateHelper.AnalyticsEnabled = false;
+ Assert.IsFalse(ServiceStateHelper.AnalyticsEnabled);
+ ServiceStateHelper.CrashesEnabled = false;
+ Assert.IsFalse(ServiceStateHelper.CrashesEnabled);
+
+ /* Test that enabling MobileCenter enabling everything, regardless of previous states */
+ ServiceStateHelper.MobileCenterEnabled = true;
+ Assert.IsTrue(ServiceStateHelper.MobileCenterEnabled);
+ Assert.IsTrue(ServiceStateHelper.AnalyticsEnabled);
+ Assert.IsTrue(ServiceStateHelper.CrashesEnabled);
+ }
+
+ [Test]
+ public void SendEvents()
+ {
+ app.Tap(TestStrings.GoToAnalyticsPageButton);
+ app.Tap(TestStrings.SendEventButton);
+ app.Tap(TestStrings.AddPropertyButton);
+ app.Tap(TestStrings.AddPropertyButton);
+ app.Tap(TestStrings.AddPropertyButton);
+ app.Tap(TestStrings.AddPropertyButton);
+ app.Tap(TestStrings.AddPropertyButton);
+ app.Tap(TestStrings.SendEventButton);
+ /* TODO This test is incomplete */
+ }
+
+ [Test]
+ public void DivideByZero()
+ {
+ /* Crash the application with a divide by zero exception and then restart*/
+ app.Tap(TestStrings.GoToCrashesPageButton);
+ app.Tap(TestStrings.DivideByZeroCrashButton);
+ app = AppInitializer.StartApp(platform);
+ app.Tap(TestStrings.GoToCrashResultsPageButton);
+
+ /* Ensure that the callbacks were properly called */
+ CrashResultsHelper.app = app;
+ Assert.IsTrue(CrashResultsHelper.SendingErrorReportWasCalled);
+ Assert.IsTrue(CrashResultsHelper.SentErrorReportWasCalled);
+ Assert.IsFalse(CrashResultsHelper.FailedToSendErrorReportWasCalled);
+ Assert.IsTrue(CrashResultsHelper.ShouldProcessErrorReportWasCalled);
+ Assert.IsTrue(CrashResultsHelper.ShouldAwaitUserConfirmationWasCalled);
+ Assert.IsTrue(CrashResultsHelper.GetErrorAttachmentWasCalled);
+ /* TODO verify the last session error report */
+ }
+ }
+}
diff --git a/Tests/UITests/packages.config b/Tests/UITests/packages.config
new file mode 100644
index 000000000..f6ef91293
--- /dev/null
+++ b/Tests/UITests/packages.config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/iOS/AppDelegate.cs b/Tests/iOS/AppDelegate.cs
new file mode 100644
index 000000000..d47454382
--- /dev/null
+++ b/Tests/iOS/AppDelegate.cs
@@ -0,0 +1,25 @@
+using Foundation;
+using UIKit;
+using Microsoft.Azure.Mobile;
+
+namespace Contoso.Forms.Test.iOS
+{
+ [Register("AppDelegate")]
+ public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
+ {
+ public override bool FinishedLaunching(UIApplication app, NSDictionary options)
+ {
+ global::Xamarin.Forms.Forms.Init();
+
+ /* Code for starting up the Xamarin Test Cloud Agent */
+#if ENABLE_TEST_CLOUD
+ Xamarin.Calabash.Start();
+#endif
+ MobileCenter.Configure("f52dd054-e31f-4ff9-9f24-4e8d7942705b");
+
+ LoadApplication(new App());
+
+ return base.FinishedLaunching(app, options);
+ }
+ }
+}
diff --git a/Tests/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tests/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 000000000..4e646784c
--- /dev/null
+++ b/Tests/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,157 @@
+{
+ "images": [
+ {
+ "idiom": "iphone",
+ "size": "29x29",
+ "scale": "1x"
+ },
+ {
+ "idiom": "iphone",
+ "size": "29x29",
+ "scale": "2x"
+ },
+ {
+ "idiom": "iphone",
+ "size": "29x29",
+ "scale": "3x"
+ },
+ {
+ "idiom": "iphone",
+ "size": "40x40",
+ "scale": "2x"
+ },
+ {
+ "idiom": "iphone",
+ "size": "40x40",
+ "scale": "3x"
+ },
+ {
+ "idiom": "iphone",
+ "size": "57x57",
+ "scale": "1x"
+ },
+ {
+ "idiom": "iphone",
+ "size": "57x57",
+ "scale": "2x"
+ },
+ {
+ "idiom": "iphone",
+ "size": "60x60",
+ "scale": "2x"
+ },
+ {
+ "idiom": "iphone",
+ "size": "60x60",
+ "scale": "3x"
+ },
+ {
+ "idiom": "ipad",
+ "size": "29x29",
+ "scale": "1x"
+ },
+ {
+ "idiom": "ipad",
+ "size": "29x29",
+ "scale": "2x"
+ },
+ {
+ "idiom": "ipad",
+ "size": "40x40",
+ "scale": "1x"
+ },
+ {
+ "idiom": "ipad",
+ "size": "40x40",
+ "scale": "2x"
+ },
+ {
+ "idiom": "ipad",
+ "size": "50x50",
+ "scale": "1x"
+ },
+ {
+ "idiom": "ipad",
+ "size": "50x50",
+ "scale": "2x"
+ },
+ {
+ "idiom": "ipad",
+ "size": "72x72",
+ "scale": "1x"
+ },
+ {
+ "idiom": "ipad",
+ "size": "72x72",
+ "scale": "2x"
+ },
+ {
+ "idiom": "ipad",
+ "size": "76x76",
+ "scale": "1x"
+ },
+ {
+ "idiom": "ipad",
+ "size": "76x76",
+ "scale": "2x"
+ },
+ {
+ "size": "24x24",
+ "idiom": "watch",
+ "scale": "2x",
+ "role": "notificationCenter",
+ "subtype": "38mm"
+ },
+ {
+ "size": "27.5x27.5",
+ "idiom": "watch",
+ "scale": "2x",
+ "role": "notificationCenter",
+ "subtype": "42mm"
+ },
+ {
+ "size": "29x29",
+ "idiom": "watch",
+ "role": "companionSettings",
+ "scale": "2x"
+ },
+ {
+ "size": "29x29",
+ "idiom": "watch",
+ "role": "companionSettings",
+ "scale": "3x"
+ },
+ {
+ "size": "40x40",
+ "idiom": "watch",
+ "scale": "2x",
+ "role": "appLauncher",
+ "subtype": "38mm"
+ },
+ {
+ "size": "44x44",
+ "idiom": "watch",
+ "scale": "2x",
+ "role": "longLook",
+ "subtype": "42mm"
+ },
+ {
+ "size": "86x86",
+ "idiom": "watch",
+ "scale": "2x",
+ "role": "quickLook",
+ "subtype": "38mm"
+ },
+ {
+ "size": "98x98",
+ "idiom": "watch",
+ "scale": "2x",
+ "role": "quickLook",
+ "subtype": "42mm"
+ }
+ ],
+ "info": {
+ "version": 1,
+ "author": "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Tests/iOS/Assets.xcassets/Contents.json b/Tests/iOS/Assets.xcassets/Contents.json
new file mode 100644
index 000000000..4caf392f9
--- /dev/null
+++ b/Tests/iOS/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Tests/iOS/Contoso.Forms.Test.iOS.csproj b/Tests/iOS/Contoso.Forms.Test.iOS.csproj
new file mode 100644
index 000000000..68ea439c2
--- /dev/null
+++ b/Tests/iOS/Contoso.Forms.Test.iOS.csproj
@@ -0,0 +1,164 @@
+
+
+
+ Debug
+ iPhoneSimulator
+ {122FE275-3721-4C40-A1AA-E7D22813C8B9}
+ {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Exe
+ Contoso.Forms.Test.iOS
+ Contoso.Forms.Test.iOS
+ Resources
+
+
+ true
+ full
+ false
+ bin\iPhoneSimulator\Debug
+ DEBUG;ENABLE_TEST_CLOUD;
+ prompt
+ 4
+ iPhone Developer
+ true
+ true
+ true
+ true
+ 55610
+ None
+ x86_64
+ HttpClientHandler
+ Default
+ false
+
+
+
+ true
+ bin\iPhone\Release
+ __UNIFIED__;__MOBILE__;__IOS__;ENABLE_TEST_CLOUD;
+ prompt
+ 4
+ iPhone Developer
+ true
+ true
+ true
+ Entitlements.plist
+ SdkOnly
+ ARMv7, ARMv7s, ARM64
+ HttpClientHandler
+ Default
+ true
+
+
+
+ true
+ bin\iPhoneSimulator\Release
+ __UNIFIED__;__MOBILE__;__IOS__;ENABLE_TEST_CLOUD;
+ prompt
+ 4
+ iPhone Developer
+ true
+ true
+ None
+ x86_64
+ HttpClientHandler
+ Default
+
+
+ true
+ full
+ false
+ bin\iPhone\Debug
+ DEBUG;ENABLE_TEST_CLOUD;
+ prompt
+ 4
+ iPhone Developer
+ true
+ true
+ true
+ true
+ true
+ true
+ Entitlements.plist
+ SdkOnly
+ ARMv7, ARMv7s, ARM64
+ HttpClientHandler
+ Default
+
+ true
+
+
+
+
+
+
+
+ ..\..\packages\Xamarin.TestCloud.Agent.0.20.3\lib\Xamarin.iOS10\Calabash.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
+
+
+ ..\..\packages\Xamarin.Forms.2.3.3.175\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.0.5.0-r0003-1ca4f82\lib\Xamarin.iOS10\Microsoft.Azure.Mobile.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.0.5.0-r0003-1ca4f82\lib\Xamarin.iOS10\Microsoft.Azure.Mobile.iOS.Bindings.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.Analytics.0.5.0-r0003-1ca4f82\lib\Xamarin.iOS10\Microsoft.Azure.Mobile.Analytics.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.Analytics.0.5.0-r0003-1ca4f82\lib\Xamarin.iOS10\Microsoft.Azure.Mobile.Analytics.iOS.Bindings.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.Crashes.0.5.0-r0003-1ca4f82\lib\Xamarin.iOS10\Microsoft.Azure.Mobile.Crashes.dll
+
+
+ ..\..\packages\Microsoft.Azure.Mobile.Crashes.0.5.0-r0003-1ca4f82\lib\Xamarin.iOS10\Microsoft.Azure.Mobile.Crashes.iOS.Bindings.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AABF653E-0CC1-4D59-93DB-4EEF0E1DF916}
+ Contoso.Forms.Test
+
+
+
+
+
+
+ $(CreateIpaDependsOn);
+ CopyIpa
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/iOS/Entitlements.plist b/Tests/iOS/Entitlements.plist
new file mode 100644
index 000000000..9ae599370
--- /dev/null
+++ b/Tests/iOS/Entitlements.plist
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Tests/iOS/Info.plist b/Tests/iOS/Info.plist
new file mode 100644
index 000000000..16b8a7028
--- /dev/null
+++ b/Tests/iOS/Info.plist
@@ -0,0 +1,46 @@
+
+
+
+
+ CFBundleDisplayName
+ Contoso.Forms.Test
+ CFBundleName
+ Contoso.Forms.Test
+ CFBundleIdentifier
+ com.contoso.contoso-forms-test
+ CFBundleShortVersionString
+ 0.5.0
+ CFBundleVersion
+ 0.5.0
+ LSRequiresIPhoneOS
+
+ MinimumOSVersion
+ 8.0
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/AppIcon.appiconset
+
+
diff --git a/Tests/iOS/LaunchScreen.storyboard b/Tests/iOS/LaunchScreen.storyboard
new file mode 100644
index 000000000..5d2e905aa
--- /dev/null
+++ b/Tests/iOS/LaunchScreen.storyboard
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/iOS/Main.cs b/Tests/iOS/Main.cs
new file mode 100644
index 000000000..a77cb48dd
--- /dev/null
+++ b/Tests/iOS/Main.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using Foundation;
+using UIKit;
+
+namespace Contoso.Forms.Test.iOS
+{
+ public class Application
+ {
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, "AppDelegate");
+ }
+ }
+}
diff --git a/Tests/iOS/packages.config b/Tests/iOS/packages.config
new file mode 100644
index 000000000..267d9d994
--- /dev/null
+++ b/Tests/iOS/packages.config
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build.cake b/build.cake
index 4112f2f66..509be941b 100644
--- a/build.cake
+++ b/build.cake
@@ -19,8 +19,8 @@ class MobileCenterModule {
}
// SDK versions
-var ANDROID_SDK_VERSION = "0.3.2";
-var IOS_SDK_VERSION = "0.3.3";
+var ANDROID_SDK_VERSION = "0.3.3";
+var IOS_SDK_VERSION = "0.3.4";
// URLs for downloading binaries.
/*
@@ -144,6 +144,31 @@ Task("NuGet")
// Main Task.
Task("Default").IsDependentOn("NuGet");
+// Build tests
+Task("UITest").IsDependentOn("RestoreTestPackages").Does(() =>
+{
+ DotNetBuild("./Tests/UITests/Contoso.Forms.Test.UITests.csproj", c => c.Configuration = "Release");
+});
+
+Task("TestApps").IsDependentOn("UITest").Does(() =>
+{
+ // Build tests and package the applications
+ // It is important that the entire solution is built before rebuilding the iOS and Android versions due to a bug
+ // that causes improper linking of the forms application to iOS
+ DotNetBuild("./MobileCenter-SDK-Test.sln", c => c.Configuration = "Release");
+ MDToolBuild("./Tests/iOS/Contoso.Forms.Test.iOS.csproj", c => c.Configuration = "Release|iPhone");
+ AndroidPackage("./Tests/Droid/Contoso.Forms.Test.Droid.csproj", false, c => c.Configuration = "Release");
+ DotNetBuild("./Tests/UITests/Contoso.Forms.Test.UITests.csproj", c => c.Configuration = "Release");
+});
+
+Task("RestoreTestPackages").Does(() =>
+{
+ NuGetRestore("./MobileCenter-SDK-Test.sln");
+ NuGetUpdate("./Tests/Contoso.Forms.Test/packages.config");
+ NuGetUpdate("./Tests/iOS/packages.config");
+ NuGetUpdate("./Tests/Droid/packages.config");
+});
+
// Cleaning up files/directories.
Task("clean").Does(() =>
{
diff --git a/scripts/run-ui-tests.sh b/scripts/run-ui-tests.sh
new file mode 100755
index 000000000..85f567276
--- /dev/null
+++ b/scripts/run-ui-tests.sh
@@ -0,0 +1,149 @@
+#!/bin/bash
+
+if ! [ -z ${1+x} ]; then
+ if [ -z ${2+x} ] || [ -z ${3+x} ]; then
+ echo "Error - usage: ./run-ui-tests.sh {PATH_TO_APK} {PATH_TO_IPA} {BUILD_TARGET}"
+ fi
+fi
+
+# Define directory and file locations
+SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+UITEST_BUILD_DIR=$SCRIPT_DIR/../Tests/UITests/bin/Release
+BUILD_SCRIPT=build.sh
+TEST_APK=$1
+TEST_IPA=$2
+BUILD_TARGET=$3
+
+# If there are no arguments, use default values
+if [ -z ${1+x} ]; then
+ TEST_APK=$SCRIPT_DIR/../Tests/Droid/bin/Release/com.contoso.contoso_forms_test.apk
+ TEST_IPA=$SCRIPT_DIR/../Tests/iOS/bin/iPhone/Release/Contoso.Forms.Test.iOS.ipa
+ BUILD_TARGET=TestApps
+fi
+
+# Define test parameters
+LOCALE="en-US"
+USERNAME="$MOBILE_CENTER_USERNAME" # 'MOBILE_CENTER_USERNAME' environment variable must be set
+PASSWORD="$MOBILE_CENTER_PASSWORD" # 'MOBILE_CENTER_PASSWORD' environment variable must be set
+IOS_DEVICES=8551ba4e # just one device. For a suite of 40, use 118f9d2f
+ANDROID_DEVICES=f0b8289c # just one device. For a suite of 40, use f47808f1
+ANDROID_APP_NAME="mobilecenter-xamarin-testing-app-android"
+IOS_APP_NAME="mobilecenter-xamarin-testing-app-ios"
+ANDROID_APP="$USERNAME/$ANDROID_APP_NAME"
+IOS_APP="$USERNAME/$IOS_APP_NAME"
+TEST_SERIES="master"
+
+# Define results constants
+ANDROID_PORTAL_URL="https://mobile.azure.com/users/$USERNAME/apps/$ANDROID_APP_NAME/test/runs/"
+IOS_PORTAL_URL="https://mobile.azure.com/users/$USERNAME/apps/$IOS_APP_NAME/test/runs/"
+ANDROID_RESULTS_FILE="android_results.txt"
+IOS_RESULTS_FILE="ios_results.txt"
+MORE_INFORMATION_TEXT="For more information, visit "
+
+# Define text attributes
+RED=$(tput setaf 1)
+GREEN=$(tput setaf 2)
+BOLD=$(tput bold)
+UNATTRIBUTED=$(tput sgr0)
+
+# Download and install NPM if it is not already installed
+npm -v &>/dev/null
+if [ $? -ne 0 ]; then
+ # Install npm
+ echo "Installing npm..."
+ brew install npm
+ if [ $? -ne 0 ]; then
+ echo "An error occured while downloading npm."
+ exit 1
+ fi
+fi
+
+# Is Mobile Center CLI installed?
+npm list -g mobile-center-cli >/dev/null
+if [ $? -ne 0 ]; then
+ # Install Mobile Center CLI
+ echo "Installing Mobile Center CLI..."
+ npm install -g mobile-center-cli
+ if [ $? -ne 0 ]; then
+ echo "An error occured while installing Mobile Center CLI."
+ exit 1
+ fi
+fi
+
+# Log in to Mobile Center
+echo "Logging in to mobile center..."
+mobile-center login -u "$USERNAME" -p "$PASSWORD"
+if [ $? -ne 0 ]; then
+ echo "An error occured while logging into Mobile Center."
+ exit 1
+fi
+
+# Build tests
+echo "Building target \"$BUILD_TARGET\"..."
+
+pushd ..
+sh $BUILD_SCRIPT -t $BUILD_TARGET
+if [ $? -ne 0 ]; then
+ echo "An error occured while building tests."
+ popd
+ exit 1
+fi
+popd
+
+# Run Android tests
+echo "[$(date)] Running Android tests..."
+mobile-center test run uitest --app $ANDROID_APP\
+ --devices $ANDROID_DEVICES --app-path $TEST_APK\
+ --test-series $TEST_SERIES --locale $LOCALE\
+ --build-dir $UITEST_BUILD_DIR > $ANDROID_RESULTS_FILE
+ANDROID_RETURN_CODE=$?
+echo "[$(date)] Android tests completed."
+ANDROID_TEST_RUN_ID=$(
+while read -r line
+do
+ if [ $(expr "$line" : "Test run id: ") -ne 0 ]; then
+ echo $(echo $line | cut -d'"' -f 2)
+ break
+ fi
+done < $ANDROID_RESULTS_FILE)
+rm $ANDROID_RESULTS_FILE
+
+# Run iOS tests
+echo "Running iOS tests..."
+mobile-center test run uitest --app $IOS_APP\
+ --devices $IOS_DEVICES --app-path $TEST_IPA\
+ --test-series $TEST_SERIES --locale $LOCALE\
+ --build-dir $UITEST_BUILD_DIR > $IOS_RESULTS_FILE
+IOS_RETURN_CODE=$?
+echo "[$(date)] iOS tests completed."
+IOS_TEST_RUN_ID=$(
+while read -r line
+do
+ if [ $(expr "$line" : "Test run id: ") -ne 0 ]; then
+ echo $(echo $line | cut -d'"' -f 2)
+ break
+ fi
+done < $IOS_RESULTS_FILE)
+rm $IOS_RESULTS_FILE
+
+# Print results
+print_results () {
+ if [ $2 -eq 0 ]; then
+ echo "${BOLD}$1 test results: ${GREEN}passed! ${UNATTRIBUTED}"
+ fi
+ if [ $2 -ne 0 ]; then
+ echo "${BOLD}$1 test results: ${RED}failed. ${UNATTRIBUTED}"
+ fi
+}
+
+print_results "Android" $ANDROID_RETURN_CODE
+echo "${BOLD}$MORE_INFORMATION_TEXT$ANDROID_PORTAL_URL$ANDROID_TEST_RUN_ID.${UNATTRIBUTED}"
+
+print_results "iOS" $IOS_RETURN_CODE
+echo "${BOLD}$MORE_INFORMATION_TEXT$IOS_PORTAL_URL$IOS_TEST_RUN_ID.${UNATTRIBUTED}"
+
+# If iOS or Android tests failed, exit failure. Otherwise exit success
+if [ $IOS_RETURN_CODE -ne 0 ] || [ $ANDROID_RETURN_CODE -ne 0 ]; then
+ exit 1
+fi
+exit 0
diff --git a/scripts/set-release-version.sh b/scripts/set-release-version.sh
index 34774a94a..9d2e227a2 100755
--- a/scripts/set-release-version.sh
+++ b/scripts/set-release-version.sh
@@ -8,4 +8,15 @@ currentVersion=`grep AssemblyInformationalVersion SDK/MobileCenter/Microsoft.Azu
officialVersion=`sed -E 's/(.*)-.*/\1/' <<< "$currentVersion"`
# Replace version in all the assemblies
-find SDK -name AssemblyInfo.cs | xargs sed -E -i '' "s/(AssemblyInformationalVersion\(\")(.*)\"\)/\1$officialVersion\")/g"
+for file in `find . -name AssemblyInfo.cs | grep -v Demo`
+do
+ sed -E -i '' "s/(AssemblyInformationalVersion\(\")(.*)\"\)/\1$officialVersion\")/g" $file
+done
+
+sed -E -i '' "s/(Version = \")(.*)\"/\1$officialVersion\"/g" SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs
+
+# Replace android versions
+for file in `find . -name AndroidManifest.xml | grep Properties | grep -v Demo`
+do
+ sed -E -i '' "s/(android:versionName=\")([^\"]+)/\1$officialVersion/g" $file
+done
diff --git a/scripts/start-new-version.sh b/scripts/start-new-version.sh
index 379fed376..915464950 100755
--- a/scripts/start-new-version.sh
+++ b/scripts/start-new-version.sh
@@ -1,6 +1,29 @@
#!/bin/bash
set -e
+export version=$1
+export snapshotVersion=$1-SNAPSHOT
+
# Replace version in all the assemblies
-find SDK -name AssemblyInfo.cs | xargs sed -E -i '' "s/(AssemblyInformationalVersion\(\")(.*)\"\)/\1$1-SNAPSHOT\")/g"
-find SDK -name AssemblyInfo.cs | xargs sed -E -i '' "s/(AssemblyFileVersion\(\")(.*)\"\)/\1$1.0\")/g"
+for file in `find . -name AssemblyInfo.cs | grep -v Demo`
+do
+ sed -E -i '' "s/(AssemblyInformationalVersion\(\")(.*)\"\)/\1$snapshotVersion\")/g" $file
+ sed -E -i '' "s/(AssemblyFileVersion\(\")(.*)\"\)/\1$version.0\")/g" $file
+done
+
+sed -E -i '' "s/(Version = \")(.*)\"/\1$snapshotVersion\"/g" SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs
+
+# Replace android versions
+for file in `find . -name AndroidManifest.xml | grep Properties | grep -v Demo`
+do
+ sed -E -i '' "s/(android:versionName=\")([^\"]+)/\1$snapshotVersion/g" $file
+ versionCode=$((`grep versionCode $file | sed -E "s/^.*versionCode=\"([^\"]*)\".*$/\1/"`+1))
+ sed -E -i '' "s/(android:versionCode=\")([^\"]+)/\1$versionCode/g" $file
+done
+
+# Replace ios versions
+for file in `find Apps Tests -name Info.plist | egrep -v "/(obj|bin|.*Demo.*)/"`
+do
+ perl -pi -e 'undef $/; s/(CFBundleVersion<\/key>\s*)([^<]*)/${1}$ENV{version}/' $file
+ perl -pi -e 'undef $/; s/(CFBundleShortVersionString<\/key>\s*)([^<]*)/${1}$ENV{version}/' $file
+done
\ No newline at end of file
diff --git a/scripts/update-demo-version.sh b/scripts/update-demo-version.sh
new file mode 100755
index 000000000..ad82fd29a
--- /dev/null
+++ b/scripts/update-demo-version.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+set -e
+
+# Replace version in all the assemblies
+for file in `find Apps -name AssemblyInfo.cs | grep Demo`
+do
+ sed -E -i '' "s/(AssemblyInformationalVersion\(\")(.*)\"\)/\1$1\")/g" $file
+ sed -E -i '' "s/(AssemblyFileVersion\(\")(.*)\"\)/\1$1.0\")/g" $file
+done
+
+# Replace android versions
+for file in `find Apps -name AndroidManifest.xml | grep Properties | grep Demo`
+do
+ sed -E -i '' "s/(android:versionName=\")([^\"]+)/\1$1/g" $file
+ versionCode=$((`grep versionCode $file | sed -E "s/^.*versionCode=\"([^\"]*)\".*$/\1/"`+1))
+ sed -E -i '' "s/(android:versionCode=\")([^\"]+)/\1$versionCode/g" $file
+done
+
+# Replace ios versions
+for file in `find Apps -name Info.plist | grep Demo | egrep -v "/(obj|bin)/"`
+do
+ versionName=$1 perl -pi -e 'undef $/; s/(CFBundleVersion<\/key>\s*)([^<]*)/${1}$ENV{versionName}/' $file
+ versionName=$1 perl -pi -e 'undef $/; s/(CFBundleShortVersionString<\/key>\s*)([^<]*)/${1}$ENV{versionName}/' $file
+done
+
+# Replace nuget package dependencies for Mobile Center
+for file in `find Apps -name packages.config | grep Demo`
+do
+ sed -E -i '' "s/(Microsoft.Azure.Mobile.*version=\")([^\"]*)/\1$1/g" $file
+done
\ No newline at end of file