Skip to content

Commit

Permalink
Update to GA
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamescaper committed Jun 8, 2022
1 parent 8af7b68 commit 8d416f2
Show file tree
Hide file tree
Showing 54 changed files with 360 additions and 315 deletions.
2 changes: 1 addition & 1 deletion samples/ControlGallery/ControlGallery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/ControlGallery/Views/NavigationSource.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<ContentPage>
<ScrollView>
<StackLayout>
<StackLayout Spacing="10">
<Button Text="Navigate with no parameters" OnClick="NavigateNoParameter"></Button>
<Button Text="Navigate with name string" OnClick="NavigateWithName"></Button>
<Button Text="Navigate with name string and version int" OnClick="NavigateWithNameAndVersion"></Button>
Expand Down
2 changes: 1 addition & 1 deletion samples/ControlGallery/Views/PlaygroundList.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<ContentPage>
<ScrollView>
<StackLayout Padding="10">
<StackLayout Padding="10" Spacing="10">
<Label Text="Select a playground..." FontSize="30" FontAttributes="FontAttributes.Bold" />
<BoxView Margin="10" HeightRequest="2" Color="Colors.DarkGray" HorizontalOptions="LayoutOptions.FillAndExpand" />
<Button Text="Common controls" OnClick="@(async () => await NavigationManager.NavigateToAsync("/commoncontrols"))"></Button>
Expand Down
2 changes: 1 addition & 1 deletion samples/HybridApp/HybridApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
Expand Down
2 changes: 0 additions & 2 deletions samples/HybridApp/Platforms/MacCatalyst/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Foundation;
using Microsoft.Maui;
using Microsoft.Maui.Hosting;

namespace HybridApp
{
Expand Down
7 changes: 0 additions & 7 deletions samples/HybridApp/Platforms/Windows/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,5 @@ public App()
}

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();

protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);

Microsoft.Maui.Essentials.Platform.OnLaunched(args);
}
}
}
2 changes: 0 additions & 2 deletions samples/HybridApp/Platforms/iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Foundation;
using Microsoft.Maui;
using Microsoft.Maui.Hosting;

namespace HybridApp
{
Expand Down
2 changes: 1 addition & 1 deletion samples/HybridAuthSample/HybridAuthApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
Expand Down
5 changes: 2 additions & 3 deletions samples/HybridAuthSample/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

using HybridAuthApp;
using Microsoft.MobileBlazorBindings;
using Microsoft.MobileBlazorBindings.Authentication;

namespace HybridAuthSample
namespace HybridAuthApp
{
public static class MauiProgram
{
Expand Down Expand Up @@ -50,7 +49,7 @@ public static MauiApp CreateMauiApp()
.AddHttpMessageHandler(() => new ApiAuthorizationMessageHandler(BaseUrl));

// Add the http client as the default to inject.
builder.Services.AddScoped<HttpClient>(sp =>
builder.Services.AddScoped(sp =>
{
var accessTokenProvider = sp.GetRequiredService<IAccessTokenProvider>();
var httpClientFactory = sp.GetRequiredService<IHttpClientFactory>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,4 @@
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<queries>
<intent>
<action android:name="android.support.customtabs.action.CustomTabsService" />
</intent>
</queries>
</manifest>
22 changes: 2 additions & 20 deletions samples/HybridAuthSample/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,11 @@

using Android.App;
using Android.Content.PM;
using Android.OS;

namespace HybridAuthSample
namespace HybridAuthApp
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, Exported = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
public class MainActivity : MauiAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
Platform.Init(this, savedInstanceState);
}

public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
{
Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}

protected override void OnResume()
{
Platform.OnResume();
base.OnResume();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Android.App;
using Android.Runtime;

namespace HybridAuthSample
namespace HybridAuthApp
{
[Application]
public class MainApplication : MauiApplication
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using Foundation;
using Microsoft.Maui;
using Microsoft.Maui.Hosting;

namespace HybridAuthSample
namespace HybridAuthApp
{
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
Expand Down
52 changes: 26 additions & 26 deletions samples/HybridAuthSample/Platforms/MacCatalyst/Info.plist
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion samples/HybridAuthSample/Platforms/MacCatalyst/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UIKit;

namespace HybridAuthSample
namespace HybridAuthApp
{
public class Program
{
Expand Down
4 changes: 2 additions & 2 deletions samples/HybridAuthSample/Platforms/Windows/App.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<maui:MauiWinUIApplication
x:Class="HybridAuthSample.WinUI.App"
x:Class="HybridAuthApp.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:HybridAuthSample.WinUI">
xmlns:local="using:HybridAuthApp.WinUI">

</maui:MauiWinUIApplication>
9 changes: 1 addition & 8 deletions samples/HybridAuthSample/Platforms/Windows/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.

namespace HybridAuthSample.WinUI
namespace HybridAuthApp.WinUI
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
Expand All @@ -23,12 +23,5 @@ public App()
}

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();

protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);

Microsoft.Maui.Essentials.Platform.OnLaunched(args);
}
}
}
2 changes: 1 addition & 1 deletion samples/HybridAuthSample/Platforms/Windows/app.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="HybridAuthSample.WinUI.app"/>
<assemblyIdentity version="1.0.0.0" name="HybridAuthApp.WinUI.app"/>

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
Expand Down
5 changes: 2 additions & 3 deletions samples/HybridAuthSample/Platforms/iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Android.Runtime;
using Foundation;
using Foundation;

namespace MauiApp1
namespace HybridAuthApp
{
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
Expand Down
13 changes: 0 additions & 13 deletions samples/HybridAuthSample/Platforms/iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,5 @@
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>URL Type App</string>
<key>CFBundleURLSchemes</key>
<array>
<string>app</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
</dict>
</plist>
2 changes: 1 addition & 1 deletion samples/HybridAuthSample/Platforms/iOS/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UIKit;

namespace HybridAuthSample
namespace HybridAuthApp
{
public class Program
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
Expand All @@ -46,9 +46,9 @@

<ItemGroup>
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
<PackageReference Include="SQLitePCLRaw.core" Version="2.0.7" />
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.0.7" />
<PackageReference Include="SQLitePCLRaw.provider.dynamic_cdecl" Version="2.0.7" />
<PackageReference Include="SQLitePCLRaw.core" Version="2.1.0" />
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.0" />
<PackageReference Include="SQLitePCLRaw.provider.dynamic_cdecl" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Android.Content.PM;
using Android.OS;

namespace MobileBlazorBindingsToDo.Platforms.Android
namespace MobileBlazorBindingsToDo
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
public class MainActivity : MauiAppCompatActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Android.App;
using Android.Runtime;

namespace MobileBlazorBindingsToDo.Platforms.Android
namespace MobileBlazorBindingsToDo
{
[Application]
public class MainApplication : MauiApplication
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Foundation;
using Microsoft.Maui;

namespace MobileBlazorBindingsToDo
{
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
30 changes: 30 additions & 0 deletions samples/MobileBlazorBindingsToDo/Platforms/MacCatalyst/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>

0 comments on commit 8d416f2

Please sign in to comment.