Skip to content

Instantly share code, notes, and snippets.

@vhugogarcia
Created April 26, 2024 18:31
Show Gist options
  • Save vhugogarcia/c62e7999251014d725f544fe3a64d849 to your computer and use it in GitHub Desktop.
Save vhugogarcia/c62e7999251014d725f544fe3a64d849 to your computer and use it in GitHub Desktop.
Firebase Binding Sample CSPROJ
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Sample</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>1998,8632</NoWarn>
<!-- Display name -->
<ApplicationTitle>Sample</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.demo.sample</ApplicationId>
<ApplicationIdGuid>95B463CE-1111-1111-88BB-3ABDRNDJHD123</ApplicationIdGuid>
<!-- Versions -->
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
<!-- Enable to debug only -->
<!-- <_MauiForceXamlCForDebug>true</_MauiForceXamlCForDebug> -->
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.4</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">28.0</SupportedOSPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0-ios'">
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>2</ApplicationVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0-android'">
<ApplicationDisplayVersion>1.0.2</ApplicationDisplayVersion>
<ApplicationVersion>101</ApplicationVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'">
<MtouchLink>None</MtouchLink>
<CodesignProvision>App Development</CodesignProvision>
<CodesignKey>Apple Development (XXXXXXX)</CodesignKey>
<CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements>
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
<CodesignProvision>App Distribution</CodesignProvision>
<CodesignKey>iPhone Distribution (XXXXXXX)</CodesignKey>
<CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements>
<MtouchLink>SdkOnly</MtouchLink>
<MtouchUseLlvm>true</MtouchUseLlvm>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'">
<JavaMaximumHeapSize>4G</JavaMaximumHeapSize>
<AndroidPackageFormat>aab</AndroidPackageFormat>
<AndroidEnableProfiledAot>true</AndroidEnableProfiledAot>
<Optimize>true</Optimize>
<AndroidLinkTool>r8</AndroidLinkTool>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'">
<JavaMaximumHeapSize>4G</JavaMaximumHeapSize>
<AndroidPackageFormat>apk</AndroidPackageFormat>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup>
<!-- Target needed until LinkWithSwiftSystemLibraries makes it into the SDK: https://github.com/xamarin/xamarin-macios/pull/20463 -->
<Target Name="LinkWithSwift" DependsOnTargets="_ParseBundlerArguments;_DetectSdkLocations" BeforeTargets="_LinkNativeExecutable">
<PropertyGroup>
<_SwiftPlatform Condition="$(RuntimeIdentifier.StartsWith('iossimulator-'))">iphonesimulator</_SwiftPlatform>
<_SwiftPlatform Condition="$(RuntimeIdentifier.StartsWith('ios-'))">iphoneos</_SwiftPlatform>
</PropertyGroup>
<ItemGroup>
<_CustomLinkFlags Include="-L" />
<_CustomLinkFlags Include="/usr/lib/swift" />
<_CustomLinkFlags Include="-L" />
<_CustomLinkFlags Include="$(_SdkDevPath)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(_SwiftPlatform)" />
<_CustomLinkFlags Include="-Wl,-rpath" />
<_CustomLinkFlags Include="-Wl,/usr/lib/swift" />
</ItemGroup>
</Target>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" Color="#FFFFFF" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" BaseSize="128,128">
<Color>#FFFFFF</Color>
</MauiSplashScreen>
<!-- Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.20" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.20" />
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android'">
<GoogleServicesJson Include="google-services.json" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-ios'">
<BundleResource Include="GoogleService-Info.plist" Link="GoogleService-Info.plist" />
</ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment