Skip to content

Commit

Permalink
Merge pull request #105 from Microsoft/develop
Browse files Browse the repository at this point in the history
Prepare 0.5.0 release
  • Loading branch information
guperrot authored Dec 16, 2016
2 parents 861e159 + ac13a4a commit b4b141a
Show file tree
Hide file tree
Showing 118 changed files with 2,983 additions and 313 deletions.
4 changes: 2 additions & 2 deletions Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.azure.mobile.xamarin.puppet" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.azure.mobile.xamarin.puppet" android:versionCode="3" android:versionName="0.5.0-SNAPSHOT" android:installLocation="auto">
<uses-sdk android:minSdkVersion="16" />
<application android:label="SXPuppet" android:icon="@drawable/Icon"></application>
</manifest>
</manifest>
4 changes: 2 additions & 2 deletions Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
<AndroidLinkMode>Full</AndroidLinkMode>
<AndroidSupportedAbis>armeabi-v7a;armeabi;x86;arm64-v8a;x86_64</AndroidSupportedAbis>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.microsoft.azure.mobile.xamarin.forms.demo">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="3" package="com.microsoft.azure.mobile.xamarin.forms.demo" android:versionName="0.4.1">
<uses-sdk android:minSdkVersion="15" />
<application android:label="MCFDemo"></application>
</manifest>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
<package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid70" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid70" />
<package id="Xamarin.Forms" version="2.3.3.175" targetFramework="monoandroid70" />
</packages>
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.4.1.0")]
[assembly: ComVisible(false)]
20 changes: 7 additions & 13 deletions Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
6 changes: 3 additions & 3 deletions Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
<dict>
<key>CFBundleIdentifier</key>
<string>com.microsoft.azure.mobile.xamarin.forms.demo</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>0.4.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
Expand Down Expand Up @@ -40,5 +38,7 @@
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>CFBundleName</key>
<string>MCFDemo</string>
<key>CFBundleShortVersionString</key>
<string>0.4.1</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
<package id="Microsoft.Azure.Mobile.Analytics" version="0.4.1" targetFramework="xamarinios10" />
<package id="Microsoft.Azure.Mobile.Crashes" version="0.4.1" targetFramework="xamarinios10" />
<package id="Xamarin.Forms" version="2.3.3.175" targetFramework="xamarinios10" />
</packages>
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<DependentUpon>PropertiesContentPage.xaml</DependentUpon>
</Compile>
<Compile Include="FakeService.cs" />
<Compile Include="PreserveAttribute.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ContentPage Title="Analytics" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Contoso.Forms.Demo.AnalyticsContentPage">
<TableView Intent="Form">
<TableSection>
<SwitchCell Text="Analytics Enabled" On="true" x:Name="EnabledSwitchCell" PropertyChanged="UpdateEnabled"/>
<SwitchCell Text="Analytics Enabled" On="true" x:Name="EnabledSwitchCell" OnChanged="UpdateEnabled"/>
</TableSection>
<TableSection>
<EntryCell Label="Event Name" HorizontalTextAlignment="Start" x:Name="EventNameCell"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Microsoft.Azure.Mobile;
using Microsoft.Azure.Mobile.Analytics;
using Xamarin.Forms;

Expand All @@ -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<Property> EventProperties;
List<Property> EventProperties;

public AnalyticsContentPage()
{
InitializeComponent();
EventProperties = new List<Property>();
NumPropertiesLabel.Text = EventProperties.Count.ToString();
if (Device.OS == TargetPlatform.iOS)
if (Xamarin.Forms.Device.OS == TargetPlatform.iOS)
{
Icon = "lightning.png";
}
Expand All @@ -35,26 +37,27 @@ 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();
};
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<string, string> properties = new Dictionary<string, string>();
var properties = new Dictionary<string, string>();
foreach (Property property in EventProperties)
{
properties.Add(property.Name, property.Value);
Expand All @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
x:Class="Contoso.Forms.Demo.CrashesContentPage">
<TableView Intent="Form">
<TableSection>
<SwitchCell Text="Crashes Enabled" On="true" x:Name="CrashesEnabledSwitchCell" PropertyChanged="UpdateEnabled"/>
<SwitchCell Text="Crashes Enabled" On="true" x:Name="CrashesEnabledSwitchCell" OnChanged="UpdateEnabled"/>
</TableSection>
<TableSection>
<ViewCell Tapped="TestCrash">
Expand All @@ -19,9 +19,6 @@
</ViewCell>
<ViewCell Tapped="CrashWithNullReferenceException">
<Button Text="Crash With NullReferenceException" InputTransparent="true" Clicked="CrashWithNullReferenceException"/>
</ViewCell>
<ViewCell Tapped="CatchNullReferenceException">
<Button Text="Test Catching NullReferenceException" InputTransparent="true" Clicked="CatchNullReferenceException"/>
</ViewCell>
<ViewCell Tapped="CrashAsync">
<Button Text="Crash Inside Async Task" InputTransparent="true" Clicked="CrashAsync"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
}
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<TableView Intent="Form">
<TableSection>
<SwitchCell Text="MobileCenter Enabled" On="true" x:Name="MobileCenterEnabledSwitchCell" PropertyChanged="UpdateEnabled"/>
<SwitchCell Text="MobileCenter Enabled" On="true" x:Name="MobileCenterEnabledSwitchCell" OnChanged="UpdateEnabled"/>
</TableSection>
</TableView>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Contoso.Forms.Demo
{
[Android.Runtime.Preserve(AllMembers = true)]
public partial class MobileCenterContentPage : ContentPage
{
public MobileCenterContentPage()
Expand All @@ -12,21 +13,17 @@ public MobileCenterContentPage()
{
Icon = "bolt.png";
}
}
}

protected override void OnAppearing()
{
base.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;
}

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Android.Runtime
{
public sealed class PreserveAttribute : System.Attribute
{
public bool AllMembers;
public bool Conditional;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
<package id="Microsoft.Azure.Mobile.Analytics" version="0.4.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="Microsoft.Azure.Mobile.Crashes" version="0.4.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="Xamarin.Forms" version="2.3.3.175" targetFramework="portable45-net45+win8+wp8+wpa81" />
</packages>
</packages>
Loading

0 comments on commit b4b141a

Please sign in to comment.