-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
145 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{ | ||
"solution": { | ||
"path": "Acr.UserDialogs.sln", | ||
"projects": [ | ||
"src\\Acr.UserDialogs\\Acr.UserDialogs.csproj" | ||
] | ||
} | ||
"solution": { | ||
"path": "Acr.UserDialogs.sln", | ||
"projects": [ | ||
"src\\Acr.UserDialogs\\Acr.UserDialogs.csproj", | ||
"src\\Acr.UserDialogs.Maui\\Acr.UserDialogs.Maui.csproj" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net8.0;net8.0-ios;net8.0-maccatalyst;net8.0-android</TargetFrameworks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.7" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Acr.UserDialogs\Acr.UserDialogs.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace Acr.UserDialogs; | ||
|
||
|
||
public static class MauiExtensions | ||
{ | ||
public static MauiAppBuilder UseUserDialogs(this MauiAppBuilder builder) | ||
{ | ||
#if ANDROID | ||
UserDialogs.Init(() => Platform.CurrentActivity); | ||
builder.Services.AddSingleton(UserDialogs.Instance); | ||
|
||
#elif IOS || MACCATALYST | ||
builder.Services.AddSingleton(UserDialogs.Instance); | ||
|
||
#else | ||
throw new ApplicationException("This plugin only works with .NET 8.0 for Android, iOS, and Mac Catalyst. You are calling this, but it isn't from one of those targets!"); | ||
|
||
#endif | ||
|
||
return builder; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<Authors>Allan Ritchie</Authors> | ||
<PackageProjectUrl>https://github.com/aritchie/userdialogs</PackageProjectUrl> | ||
<Description>A cross platform library that allows you to call for standard user dialogs from a shared/portable library. Supports Android, iOS, and UWP</Description> | ||
<PackageTags>ios android xamarin xam.pcl dialogs plugin</PackageTags> | ||
<PackageReleaseNotes>https://github.com/aritchie/userdialogs/raw/master/ChangeLog.md</PackageReleaseNotes> | ||
<PackageIconUrl>https://github.com/aritchie/userdialogs/raw/master/icon.png</PackageIconUrl> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<LangVersion>latest</LangVersion> | ||
<NoWarn>$(NoWarn);1591;1701;1591;1702;1705;VSX1000;NU1603</NoWarn> | ||
<RepositoryUrl>https://github.com/aritchie/userdialogs</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" /> | ||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
</Project> |