<Project Sdk="Microsoft.NET.Sdk.Razor">

	<PropertyGroup>
		<TargetFrameworks>$(TargetFrameworks);net10.0-android</TargetFrameworks>
		<TargetFrameworks>$(TargetFrameworks);net10.0-ios</TargetFrameworks>

		<OutputType>Exe</OutputType>
		<RootNamespace>Fixiy.Maui</RootNamespace>
		<UseMaui>true</UseMaui>
		<SingleProject>true</SingleProject>
		<ImplicitUsings>enable</ImplicitUsings>
		<EnableDefaultCssItems>false</EnableDefaultCssItems>
		<Nullable>enable</Nullable>

		<!-- Display name -->
		<ApplicationTitle>Fixiy</ApplicationTitle>

		<!-- App Identifier -->
		<ApplicationId>it.integry.fixiy</ApplicationId>

		<!-- Versions -->
		<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
		<ApplicationVersion>1</ApplicationVersion>

		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
		<!--slower build, faster runtime in DEBUG-->
		<!-- <_MauiForceXamlCForDebug Condition="'$(Configuration)' == 'Debug'">true</_MauiForceXamlCForDebug> -->
	</PropertyGroup>

	<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
		<DefineConstants>$(DefineConstants);PLATFORM</DefineConstants>
		<SupportedOSPlatformVersion>26.0</SupportedOSPlatformVersion>
		<TargetPlatformVersion>36</TargetPlatformVersion>

		<!--<EmbedAssembliesIntoApk Condition="'$(Configuration)' == 'Debug'">true</EmbedAssembliesIntoApk>
		<AndroidPackageFormats Condition="'$(Configuration)' == 'Release'">aab</AndroidPackageFormats>
		<AndroidLinkTool>r8</AndroidLinkTool>
		<AndroidLinkTool>proguard</AndroidLinkTool>-->

	</PropertyGroup>

	<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND '$(Configuration)' == 'Debug'">

		<!--these help speed up android builds-->
		<!--
		<RuntimeIdentifier>android-arm64</RuntimeIdentifier>
		<AndroidEnableProfiler>true</AndroidEnableProfiler>
		<AndroidPackageFormat>aab</AndroidPackageFormat>
		-->
	</PropertyGroup>

	<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' AND '$(Configuration)' == 'Debug'">
		<!--forces the simulator to pickup entitlements-->
		<EnableCodeSigning>true</EnableCodeSigning>
		<CodesignRequireProvisioningProfile>true</CodesignRequireProvisioningProfile>
		<DisableCodesignVerification>true</DisableCodesignVerification>
	</PropertyGroup>

	<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
		<SupportedOSPlatformVersion>15.0</SupportedOSPlatformVersion>
		<DefineConstants>$(DefineConstants);APPLE;PLATFORM</DefineConstants>
	</PropertyGroup>

	<PropertyGroup Condition="'$(TargetFramework)'=='net10.0-ios'">
	  <CodesignKey>Apple Development: Massimo Fausto Morelli (6C2CUM53BT)</CodesignKey>
	  <CodesignProvision>VS: WildCard Development</CodesignProvision>
	</PropertyGroup>

	<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
		<!--
		<BundleResource Include="Platforms\iOS\PrivacyInfo.xcprivacy" LogicalName="PrivacyInfo.xcprivacy" />

		<CustomEntitlements Include="keychain-access-groups" Type="StringArray" Value="%24(AppIdentifierPrefix)$(ApplicationId)" Visible="false" />
		<CustomEntitlements Include="aps-environment" Type="string" Value="development" Condition="'$(Configuration)' == 'Debug'" Visible="false" />
		<CustomEntitlements Include="aps-environment" Type="string" Value="production" Condition="'$(Configuration)' == 'Release'" Visible="false" />
		-->
	</ItemGroup>

	<ItemGroup>
		<!-- App Icon -->
		<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

		<!-- Splash Screen -->
		<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

		<!-- Images -->
		<MauiImage Include="Resources\Images\*" />
		<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />

		<!-- Custom Fonts -->
		<MauiFont Include="Resources\Fonts\*" />

		<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
		<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
	</ItemGroup>

	<ItemGroup>
		<PackageReference Include="IntegryApiClient.MAUI" Version="2.2.4" />
		<PackageReference Include="Microsoft.Maui.Controls" Version="10.0.70" />
		<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="10.0.70" />
		<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="10.0.70" />
		<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.8" />
	</ItemGroup>

	<ItemGroup>
		<ProjectReference Include="..\Fixiy.Shared\Fixiy.Shared.csproj" />
	</ItemGroup>

</Project>