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

    <PropertyGroup>
        <TargetFrameworks>$(TargetFrameworks);net10.0-android</TargetFrameworks>
        <TargetFrameworks>$(TargetFrameworks);net10.0-ios</TargetFrameworks>
        <!--		<TargetFrameworks>$(TargetFrameworks);net10.0-maccatalyst</TargetFrameworks>-->
        <!--		<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks>-->
        <!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
        <!-- <TargetFrameworks>$(TargetFrameworks);net10.0-tizen</TargetFrameworks> -->

        <!-- Note for MacCatalyst:
            The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
            When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
            The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
            either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
        <!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

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

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

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

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

        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
        <!--		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">-->
        <!--			14.0-->
        <!--		</SupportedOSPlatformVersion>-->
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
        <!--		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>-->
        <!--		<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>-->
        <!--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="#FDECEA" />

        <!-- Splash Screen -->
        <MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#FDECEA" 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="CommunityToolkit.Maui" Version="14.0.0" />
        <PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
        <PackageReference Include="IntegryApiClient.MAUI" Version="2.0.0" />
        <PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.3" />
        <PackageReference Include="Microsoft.Maui.Controls" Version="10.0.41" />
        <PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="10.0.41" />
        <PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="10.0.41" />
        <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.3" />
        <PackageReference Include="Sentry.Maui" Version="6.1.0" />
        <PackageReference Include="SkiaSharp" Version="3.119.2" />
    </ItemGroup>

    <ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
        <ProjectReference Include="..\Steup.HoneywellScanner\Steup.HoneywellScanner.csproj" />
    </ItemGroup>
    
    <ItemGroup>
        <ProjectReference Include="..\SteUp.Shared\SteUp.Shared.csproj" />
        <ProjectReference Include="..\SteUp.Data\SteUp.Data.csproj" />
    </ItemGroup>

</Project>