Skip to content

Commit

Permalink
Merge pull request #980 from microsoft/develop
Browse files Browse the repository at this point in the history
Merge develop -> master for 2.1.0 release
  • Loading branch information
guperrot authored Jun 19, 2019
2 parents 2b65ba7 + 25980ef commit d5a8dd0
Show file tree
Hide file tree
Showing 128 changed files with 575 additions and 272 deletions.
1 change: 1 addition & 0 deletions Apps/Contoso.Android.Puppet/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ protected override void OnCreate(Bundle savedInstanceState)
AppCenter.SetLogUrl("https://in-integration.dev.avalanch.es");
Distribute.SetInstallUrl("https://install.portal-server-core-integration.dev.avalanch.es");
Distribute.SetApiUrl("https://asgard-int.trafficmanager.net/api/v0.1");
Distribute.SetEnabledForDebuggableBuild(true);

// Enable Firebase Analytics if set
var enableAnalytics = Preferences.SharedPreferences.GetBoolean(Constants.FirebaseAnalyticsEnabledKey, false);
Expand Down
2 changes: 1 addition & 1 deletion 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.appcenter.xamarin.puppet" android:versionCode="55" android:versionName="2.0.0-SNAPSHOT" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.appcenter.xamarin.puppet" android:versionCode="57" android:versionName="2.1.0-SNAPSHOT" android:installLocation="auto">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
<application android:label="SXPuppet" android:icon="@drawable/Icon" android:theme="@style/PuppetTheme">
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
Expand Down
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 @@ -28,5 +28,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyInformationalVersion("2.1.0-SNAPSHOT")]
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="56" android:versionName="2.0.0-SNAPSHOT" package="com.microsoft.appcenter.xamarin.forms.puppet">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="58" android:versionName="2.1.0-SNAPSHOT" package="com.microsoft.appcenter.xamarin.forms.puppet">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
<application android:label="ACFPuppet">
<activity android:name="com.microsoft.identity.client.BrowserTabActivity">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyInformationalVersion("2.1.0-SNAPSHOT")]

// 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
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="10805zumoTestUser.AppCenter-Contoso.Forms.Puppet.U" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="2.0.0.0" />
<Identity Name="10805zumoTestUser.AppCenter-Contoso.Forms.Puppet.U" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="2.1.0.0" />
<mp:PhoneIdentity PhoneProductId="55497ed8-b2ac-4485-ba79-e2b65bb720ed" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>AppCenter-Contoso.Forms.Puppet.UWP</DisplayName>
Expand Down
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("2.0.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: ComVisible(false)]
4 changes: 2 additions & 2 deletions Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<key>CFBundleIdentifier</key>
<string>com.microsoft.appcenter.xamarin.forms.puppet</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<string>2.1.0</string>
<key>CFBundleVersion</key>
<string>2.0.0</string>
<string>2.1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Include="SignInInformationContentPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
Expand Down Expand Up @@ -109,6 +113,9 @@
<DependentUpon>TextAttachmentView.xaml</DependentUpon>
</Compile>
<Compile Include="Property.cs" />
<Compile Include="SignInInformationContentPage.xaml.cs">
<DependentUpon>SignInInformationContentPage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="project.json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<ViewCell Tapped="SignOut">
<Button Text="Sign Out" InputTransparent="true" Clicked="SignOut" />
</ViewCell>
<ViewCell Tapped="SignInInformation">
<Button x:Name="SignInInformationButton" Text="Unknown" InputTransparent="true" Clicked="SignInInformation" />
</ViewCell>
</TableSection>
</TableView>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Licensed under the MIT License.

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Auth;
Expand All @@ -24,6 +26,8 @@ public partial class OthersContentPage

static bool _eventFilterStarted;

private UserInformation userInfo = null;

static OthersContentPage()
{
Data.RemoteOperationCompleted += (sender, eventArgs) =>
Expand Down Expand Up @@ -53,6 +57,11 @@ protected override async void OnAppearing()
RumEnabledSwitchCell.IsEnabled = acEnabled;
EventFilterEnabledSwitchCell.On = _eventFilterStarted && await EventFilterHolder.Implementation?.IsEnabledAsync();
EventFilterEnabledSwitchCell.IsEnabled = acEnabled && EventFilterHolder.Implementation != null;
if (userInfo?.AccountId != null)
{
SignInInformationButton.Text = "User authenticated";
}
else SignInInformationButton.Text = "User not authenticated";
}

async void UpdateDistributeEnabled(object sender, ToggledEventArgs e)
Expand Down Expand Up @@ -93,7 +102,11 @@ async void RunMBaaSAsync(object sender, EventArgs e)
{
try
{
var userInfo = await Auth.SignInAsync();
userInfo = await Auth.SignInAsync();
if (userInfo.AccountId != null)
{
SignInInformationButton.Text = "User authenticated";
}
AppCenterLog.Info(App.LogTag, "Auth.SignInAsync succeeded accountId=" + userInfo.AccountId);
}
catch (Exception ex)
Expand All @@ -120,10 +133,48 @@ async void RunMBaaSAsync(object sender, EventArgs e)
}
try
{
var objectCollection = new List<Uri>();
objectCollection.Add(new Uri("http://google.com/"));
objectCollection.Add(new Uri("http://microsoft.com/"));
objectCollection.Add(new Uri("http://facebook.com/"));
var primitiveCollection = new List<int>();
primitiveCollection.Add(1);
primitiveCollection.Add(2);
primitiveCollection.Add(3);
var dict = new Dictionary<string, Uri>();
dict.Add("key1", new Uri("http://google.com/"));
dict.Add("key2", new Uri("http://microsoft.com/"));
dict.Add("key3", new Uri("http://facebook.com/"));
var customDoc = new CustomDocument
{
Id = Guid.NewGuid(),
TimeStamp = DateTime.UtcNow
TimeStamp = DateTime.UtcNow,
SomeNumber = 123,
SomeObject = dict,
SomePrimitiveArray = new int[] { 1, 2, 3 },
SomeObjectArray = new CustomDocument[] {
new CustomDocument {
Id = Guid.NewGuid(),
TimeStamp = DateTime.UtcNow,
SomeNumber = 123,
SomeObject = dict,
SomePrimitiveArray = new int[] { 1, 2, 3 },
SomeObjectCollection = objectCollection,
SomePrimitiveCollection = primitiveCollection
}
},
SomeObjectCollection = objectCollection,
SomePrimitiveCollection = primitiveCollection,
Custom = new CustomDocument
{
Id = Guid.NewGuid(),
TimeStamp = DateTime.UtcNow,
SomeNumber = 123,
SomeObject = dict,
SomePrimitiveArray = new int[] { 1, 2, 3 },
SomeObjectCollection = objectCollection,
SomePrimitiveCollection = primitiveCollection
}
};
var id = customDoc.Id.ToString();
var document = await Data.ReplaceAsync(id, customDoc, DefaultPartitions.UserDocuments);
Expand All @@ -141,6 +192,18 @@ async void RunMBaaSAsync(object sender, EventArgs e)
void SignOut(object sender, EventArgs e)
{
Auth.SignOut();
userInfo = null;
SignInInformationButton.Text = "User not authenticated";
}

async void SignInInformation(object sender, EventArgs e)
{
if (userInfo != null)
{
string accessToken = userInfo.AccessToken?.Length > 0 ? "Set" : "Unset";
string idToken = userInfo.IdToken?.Length > 0 ? "Set" : "Unset";
await Navigation.PushModalAsync(new SignInInformationContentPage(userInfo.AccountId, accessToken, idToken));
}
}

public class CustomDocument
Expand All @@ -150,6 +213,27 @@ public class CustomDocument

[JsonProperty("timestamp")]
public DateTime TimeStamp { get; set; }

[JsonProperty("somenumber")]
public int SomeNumber { get; set; }

[JsonProperty("someprimitivearray")]
public int[] SomePrimitiveArray { get; set; }

[JsonProperty("someobjectarray")]
public CustomDocument[] SomeObjectArray { get; set; }

[JsonProperty("someprimitivecollection")]
public IList SomePrimitiveCollection { get; set; }

[JsonProperty("someobjectcollection")]
public IList SomeObjectCollection { get; set; }

[JsonProperty("someobject")]
public Dictionary<string, Uri> SomeObject { get; set; }

[JsonProperty("customdocument")]
public CustomDocument Custom { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyInformationalVersion("2.1.0-SNAPSHOT")]

// 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
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Contoso.Forms.Puppet.SignInInformationContentPage">
<StackLayout>
<StackLayout.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="iOS" Value="16,48,16,0" />
<On Platform="Android, UWP" Value="16,16,16,0" />
</OnPlatform>
</StackLayout.Margin>
<StackLayout Orientation="Horizontal">
<Label Text="AccountId" HorizontalOptions="Start" VerticalOptions="Center" WidthRequest="120" />
<Label HorizontalOptions="FillAndExpand" x:Name="AccountIdEntry" />
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label Text="AccessToken" HorizontalOptions="Start" VerticalOptions="Center" WidthRequest="120" />
<Label HorizontalOptions="FillAndExpand" x:Name="AccessTokenEntry" />
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label Text="IdToken" HorizontalOptions="Start" VerticalOptions="Center" WidthRequest="120" />
<Label HorizontalOptions="FillAndExpand" x:Name="IdTokenEntry" />
</StackLayout>
<Button Text="OK" Clicked="OkOnClick" />
</StackLayout>
</ContentPage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using Xamarin.Forms;

namespace Contoso.Forms.Puppet
{
[Android.Runtime.Preserve(AllMembers = true)]
public partial class SignInInformationContentPage : ContentPage
{
public SignInInformationContentPage(string accountIdText, string accessTokenText, string idTokenText)
{
InitializeComponent();
AccountIdEntry.Text = accountIdText;
AccessTokenEntry.Text = accessTokenText;
IdTokenEntry.Text = idTokenText;
}

async void OkOnClick(object sender, EventArgs e)
{
await Navigation.PopModalAsync();
}
}
}
2 changes: 1 addition & 1 deletion Apps/Contoso.UWP.Puppet/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="10805zumoTestUser.AppCenter-Contoso.UWP.Puppet" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="2.0.0.0" />
<Identity Name="10805zumoTestUser.AppCenter-Contoso.UWP.Puppet" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="2.1.0.0" />
<mp:PhoneIdentity PhoneProductId="ce1e8604-09a9-4ffb-846b-8762beb84188" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>AppCenter-Contoso.UWP.Puppet</DisplayName>
Expand Down
2 changes: 1 addition & 1 deletion Apps/Contoso.UWP.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("2.0.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: ComVisible(false)]
3 changes: 1 addition & 2 deletions Apps/Contoso.WPF.Demo/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public partial class App : Application
protected override void OnStartup(StartupEventArgs e)
{
AppCenter.LogLevel = LogLevel.Verbose;
AppCenter.SetLogUrl("https://in-integration.dev.avalanch.es");
AppCenter.Start("42f4a839-c54c-44da-8072-a2f2a61751b2", typeof(Analytics), typeof(Crashes));
AppCenter.Start("f4e2a83d-3052-4884-8176-8b2c50277d16", typeof(Analytics), typeof(Crashes));
}
}
}
4 changes: 2 additions & 2 deletions Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyInformationalVersion("2.1.0-SNAPSHOT")]
3 changes: 1 addition & 2 deletions Apps/Contoso.WinForms.Demo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ static void Main()
{
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);
AppCenter.LogLevel = LogLevel.Verbose;
AppCenter.SetLogUrl("https://in-integration.dev.avalanch.es");
AppCenter.Start("42f4a839-c54c-44da-8072-a2f2a61751b2", typeof(Analytics), typeof(Crashes));
AppCenter.Start("f4e2a83d-3052-4884-8176-8b2c50277d16", typeof(Analytics), typeof(Crashes));

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
4 changes: 2 additions & 2 deletions Apps/Contoso.WinForms.Puppet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyInformationalVersion("2.1.0-SNAPSHOT")]
4 changes: 2 additions & 2 deletions Apps/Contoso.iOS.Puppet/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<key>CFBundleIdentifier</key>
<string>com.microsoft.appcenter.xamarin.puppet</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<string>2.1.0</string>
<key>CFBundleVersion</key>
<string>2.0.0</string>
<string>2.1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
Expand Down
Loading

0 comments on commit d5a8dd0

Please sign in to comment.