Plugin.Maui.ApplePlatform
1.0.0.1
dotnet add package Plugin.Maui.ApplePlatform --version 1.0.0.1
NuGet\Install-Package Plugin.Maui.ApplePlatform -Version 1.0.0.1
<PackageReference Include="Plugin.Maui.ApplePlatform" Version="1.0.0.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Plugin.Maui.ApplePlatform" Version="1.0.0.1" />
<PackageReference Include="Plugin.Maui.ApplePlatform"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Plugin.Maui.ApplePlatform --version 1.0.0.1
#r "nuget: Plugin.Maui.ApplePlatform, 1.0.0.1"
#:package Plugin.Maui.ApplePlatform@1.0.0.1
#addin nuget:?package=Plugin.Maui.ApplePlatform&version=1.0.0.1
#tool nuget:?package=Plugin.Maui.ApplePlatform&version=1.0.0.1
Plugin.Maui.ApplePlatform
Compile shared iOS + MacCatalyst code from Platforms\Apple .NET MAUI app folder.
The Problem
In .NET MAUI, Platforms\iOS and Platforms\MacCatalyst compile separately. If your iOS and MacCatalyst code is identical — partial classes, handlers, renderers — you end up maintaining two copies of the same files or manually setting up conditional compilation, placing files outside of the Platforms folder.
The Solution
Installing this package will create a new folder Platforms\Apple, no more hassle, just place your shared files for IOS and MACCATALYST platform there!
Platforms\
Apple\ ← shared code for Apple
MyAppleHandler.cs
iOS\ ← still works as usual
MacCatalyst\ ← still works as usual
Android\
Windows\
Install
dotnet add package Plugin.Maui.ApplePlatform
Or via NuGet Package Manager — search Plugin.Maui.ApplePlatform.
How It Works
The package ships an MSBuild .targets file that:
- Creates
Platforms\Applefolder before build (if missing) - When targeting
net*-ios— includes allPlatforms\Apple\**\*.cswith virtual linkPlatforms\iOS\... - When targeting
net*-maccatalyst— includes allPlatforms\Apple\**\*.cswith virtual linkPlatforms\macCatalyst\...
Files are never copied. The compiler sees them at the correct virtual path. Solution Explorer shows them under the right platform node.
Notes
- Files in
Platforms\iOSandPlatforms\MacCatalyststill work as before — platform-specific overrides go there - Partial classes split between
Platforms\Appleand a platform-specific folder work correctly - No manual configuration needed after install!
License
MIT
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0.1 | 156 | 4/20/2026 |
| 1.0.0-pre6 | 144 | 4/20/2026 |