Skip to content

Commit

Permalink
Merge branch 'master' into v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Dec 11, 2023
2 parents 3e259e1 + ca701a6 commit b4a7004
Show file tree
Hide file tree
Showing 64 changed files with 752 additions and 461 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET 7.0
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
# dotnet-quality: 'preview'
dotnet-version: '8.0.x'

- uses: AdoptOpenJDK/install-jdk@v1
with:
version: '13'
architecture: x64

- name: Add .NET Workloads
run: dotnet workload install maui-ios maui-android maui-maccatalyst maui-windows
Expand Down
36 changes: 15 additions & 21 deletions Shiny.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{7C114E37-36C8-4971-91C6-E2557DDCB4E8}"
ProjectSection(SolutionItems) = preProject
samples\readme.md = samples\readme.md
samples\Directory.build.props = samples\Directory.build.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{6374E4D9-1BD8-4880-B603-AFDEA8345D7E}"
Expand Down Expand Up @@ -87,10 +88,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShinyBuild", "build\ShinyBu
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shiny.Logging.AppCenter", "src\Shiny.Logging.AppCenter\Shiny.Logging.AppCenter.csproj", "{7A3AF2C7-1EDF-4BE2-ACC2-CC4C91A87601}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Maui", "samples\Sample.Maui\Sample.Maui.csproj", "{0E712AE3-FF27-4EE4-B10A-8921C48651AD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shiny.Hosting.Uno", "src\Shiny.Hosting.Uno\Shiny.Hosting.Uno.csproj", "{29813950-000D-4568-A41B-AF2633D3E07B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shiny.Support.Repositories", "src\Shiny.Support.Repositories\Shiny.Support.Repositories.csproj", "{47A57CFE-A1A8-407A-86FA-FA003D562C58}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shiny.Tests", "tests\Shiny.Tests\Shiny.Tests.csproj", "{B145321D-8E33-4A33-B5CF-37A162C0E261}"
Expand All @@ -109,7 +106,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shiny.Push.FirebaseMessagin
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Api", "samples\Sample.Api\Sample.Api.csproj", "{6084D6FA-765E-4AE2-A29E-3FE9DFC4A5FC}"
EndProject
Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "Sample.Blazor", "samples\Sample.Blazor\Sample.Blazor.csproj", "{E74E02DF-9FC8-4883-9B7C-21857D661325}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Maui", "samples\Sample.Maui\Sample.Maui.csproj", "{88774A33-08F5-4AA1-A77C-A7ED2CFFDE51}"
EndProject
Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "Sample.Blazor", "samples\Sample.Blazor\Sample.Blazor.csproj", "{C21631E7-A789-4DF8-B83F-03D6A07B57B4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -207,15 +206,6 @@ Global
{7A3AF2C7-1EDF-4BE2-ACC2-CC4C91A87601}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A3AF2C7-1EDF-4BE2-ACC2-CC4C91A87601}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A3AF2C7-1EDF-4BE2-ACC2-CC4C91A87601}.Release|Any CPU.Build.0 = Release|Any CPU
{0E712AE3-FF27-4EE4-B10A-8921C48651AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E712AE3-FF27-4EE4-B10A-8921C48651AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E712AE3-FF27-4EE4-B10A-8921C48651AD}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{0E712AE3-FF27-4EE4-B10A-8921C48651AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E712AE3-FF27-4EE4-B10A-8921C48651AD}.Release|Any CPU.Build.0 = Release|Any CPU
{29813950-000D-4568-A41B-AF2633D3E07B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29813950-000D-4568-A41B-AF2633D3E07B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29813950-000D-4568-A41B-AF2633D3E07B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29813950-000D-4568-A41B-AF2633D3E07B}.Release|Any CPU.Build.0 = Release|Any CPU
{47A57CFE-A1A8-407A-86FA-FA003D562C58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47A57CFE-A1A8-407A-86FA-FA003D562C58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47A57CFE-A1A8-407A-86FA-FA003D562C58}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -254,10 +244,15 @@ Global
{6084D6FA-765E-4AE2-A29E-3FE9DFC4A5FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6084D6FA-765E-4AE2-A29E-3FE9DFC4A5FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6084D6FA-765E-4AE2-A29E-3FE9DFC4A5FC}.Release|Any CPU.Build.0 = Release|Any CPU
{E74E02DF-9FC8-4883-9B7C-21857D661325}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E74E02DF-9FC8-4883-9B7C-21857D661325}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E74E02DF-9FC8-4883-9B7C-21857D661325}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E74E02DF-9FC8-4883-9B7C-21857D661325}.Release|Any CPU.Build.0 = Release|Any CPU
{88774A33-08F5-4AA1-A77C-A7ED2CFFDE51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88774A33-08F5-4AA1-A77C-A7ED2CFFDE51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88774A33-08F5-4AA1-A77C-A7ED2CFFDE51}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{88774A33-08F5-4AA1-A77C-A7ED2CFFDE51}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88774A33-08F5-4AA1-A77C-A7ED2CFFDE51}.Release|Any CPU.Build.0 = Release|Any CPU
{C21631E7-A789-4DF8-B83F-03D6A07B57B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C21631E7-A789-4DF8-B83F-03D6A07B57B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C21631E7-A789-4DF8-B83F-03D6A07B57B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C21631E7-A789-4DF8-B83F-03D6A07B57B4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -281,8 +276,6 @@ Global
{DA452A0B-08F8-4809-95F4-9CD583F30FEA} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
{452F676E-22B7-49A6-9603-D39689F0EAAD} = {3A15354E-BAD2-4195-BE6B-49ED2B4E56E6}
{7A3AF2C7-1EDF-4BE2-ACC2-CC4C91A87601} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
{0E712AE3-FF27-4EE4-B10A-8921C48651AD} = {7C114E37-36C8-4971-91C6-E2557DDCB4E8}
{29813950-000D-4568-A41B-AF2633D3E07B} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
{47A57CFE-A1A8-407A-86FA-FA003D562C58} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
{B145321D-8E33-4A33-B5CF-37A162C0E261} = {7C114E37-36C8-4971-91C6-E2557DDCB4E8}
{2E4505D4-B9B3-4836-A0F8-37BA72025D3D} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
Expand All @@ -292,7 +285,8 @@ Global
{F97CC87B-85A8-4400-A8CD-30845535C011} = {7C114E37-36C8-4971-91C6-E2557DDCB4E8}
{A7717BEB-CF3C-4CAB-8826-FD3848CCBE95} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
{6084D6FA-765E-4AE2-A29E-3FE9DFC4A5FC} = {7C114E37-36C8-4971-91C6-E2557DDCB4E8}
{E74E02DF-9FC8-4883-9B7C-21857D661325} = {7C114E37-36C8-4971-91C6-E2557DDCB4E8}
{88774A33-08F5-4AA1-A77C-A7ED2CFFDE51} = {7C114E37-36C8-4971-91C6-E2557DDCB4E8}
{C21631E7-A789-4DF8-B83F-03D6A07B57B4} = {7C114E37-36C8-4971-91C6-E2557DDCB4E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {135D86AF-4EC4-4AA0-BD06-75C410F3EA08}
Expand Down
7 changes: 3 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ things like dependency injection & logging in a structured way to your code!
## Supports
* Xamarin iOS
* Xamarin Android
* .NET 7 for Android
* .NET 7 for iOS
* .NET 7 for MacCatalyst
* .NET 7 for Windows (Core & BLE)
* .NET 8 for Android
* .NET 8 for iOS
* .NET 8 for MacCatalyst

## Features
* Handles all of the cruft like Permissions, main thread traversal, persistent storage and app restarts
Expand Down
6 changes: 6 additions & 0 deletions samples/Directory.build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<MauiVersion>8.0.3</MauiVersion>
<MicrosoftExtensionsVersion>8.0.0</MicrosoftExtensionsVersion>
</PropertyGroup>
</Project>
32 changes: 30 additions & 2 deletions samples/Sample.Api/Controllers/PushController.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
namespace Sample.Api.Controllers;
using Shiny.Extensions.Push;

namespace Sample.Api.Controllers;


[ApiController]
[Route("[controller]")]
public class PushController : Controller
{
public PushController()
readonly IPushManager pushManager;

public PushController(IPushManager pushManager)
{
this.pushManager = pushManager;
}


[HttpPost]
public async Task<IActionResult> Register([FromBody] RegisterArgs args)
{
return this.Ok(null);
}


[HttpPost]
public async Task<ActionResult<object>> Send([FromBody] SendArgs args)
{
return this.Ok(null);
}
}

public record RegisterArgs(
bool IsApple,
string RegistrationToken
);


public record SendArgs(
string Message
);
7 changes: 0 additions & 7 deletions samples/Sample.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.

builder.Services.Configure<KestrelServerOptions>(options =>
{
options.Limits.MaxRequestBodySize = int.MaxValue; // if don't set default value is: 30 MB
Expand All @@ -16,23 +14,18 @@
x.MultipartHeadersLengthLimit = int.MaxValue;
});
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();

app.UseAuthorization();

app.MapControllers();

app.Run();
Expand Down
5 changes: 3 additions & 2 deletions samples/Sample.Api/Sample.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup Condition=" '$(RunConfiguration)' == 'https' " />
<PropertyGroup Condition=" '$(RunConfiguration)' == 'http' " />
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.12" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="$(MicrosoftExtensionsVersion)" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Shiny.Extensions.Push" Version="2.0.0-preview-0009" />
</ItemGroup>

</Project>
22 changes: 17 additions & 5 deletions samples/Sample.Api/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"Push": {
"AzureNotificationHubs": {
"ConnectionString": "",
"HubName": ""
},
"Firebase": {

}
//"Apple": {
// "": ""
//}
}
}
}

6 changes: 3 additions & 3 deletions samples/Sample.Blazor/Sample.Blazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Sample</RootNamespace>
Expand All @@ -17,8 +17,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="$(MicrosoftExtensionsVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="$(MicrosoftExtensionsVersion)" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
33 changes: 33 additions & 0 deletions samples/Sample.Maui/CurrentPermissionPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:sample="clr-namespace:Sample"
x:DataType="sample:CurrentPermissionViewModel"
x:Class="Sample.CurrentPermissionPage"
Title="Current Permissions">

<RefreshView Command="{Binding Refresh}"
IsRefreshing="{Binding IsRefreshing}">
<CollectionView ItemsSource="{Binding PermissionSet}">
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="sample:PermissionViewModel">
<VerticalStackLayout>
<VerticalStackLayout.GestureRecognizers>
<TapGestureRecognizer Command="{Binding Request}" />
</VerticalStackLayout.GestureRecognizers>

<Label Text="{Binding Description}"
FontSize="Large"
FontAttributes="Bold" />

<Label Text="{Binding Status}"
FontSize="Small"
FontAttributes="Italic" />

<BoxView Style="{StaticResource HR}" />
</VerticalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</RefreshView>
</ContentPage>
9 changes: 9 additions & 0 deletions samples/Sample.Maui/CurrentPermissionPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Sample;

public partial class CurrentPermissionPage : ContentPage
{
public CurrentPermissionPage()
{
this.InitializeComponent();
}
}
Loading

0 comments on commit b4a7004

Please sign in to comment.