Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ppy
GitHub Repository: ppy/osu
Path: blob/master/osu.iOS/osu.iOS.csproj
2260 views
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup Label="Project">
    <TargetFramework>net8.0-ios</TargetFramework>
    <SupportedOSPlatformVersion>13.4</SupportedOSPlatformVersion>
    <OutputType>Exe</OutputType>
    <Version>0.1.0</Version>

    <!-- Incoming version string will be e.g. 2025.723.0-tachyon -->
    <VersionNoSuffix>$([System.String]::Copy('$(Version)').Split('-')[0])</VersionNoSuffix>

    <ApplicationVersion Condition=" '$(ApplicationVersion)' == '' ">$(VersionNoSuffix)</ApplicationVersion>
    <ApplicationDisplayVersion Condition=" '$(ApplicationDisplayVersion)' == '' ">$(VersionNoSuffix)</ApplicationDisplayVersion>
  </PropertyGroup>
  <Import Project="..\osu.iOS.props" />
  <ItemGroup>
    <ProjectReference Include="..\osu.Game\osu.Game.csproj" />
    <ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj" />
    <ProjectReference Include="..\osu.Game.Rulesets.Mania\osu.Game.Rulesets.Mania.csproj" />
    <ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
    <ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Maui.Essentials" Version="8.0.3" />
  </ItemGroup>
  <!-- https://github.com/dotnet/macios/blob/eabcdee2ac43a0cc8324396a1bf75f8797d71810/msbuild/Xamarin.Shared/Xamarin.Shared.targets#L1328 -->
  <Target Name="AddOsuVersionToBundle" AfterTargets="_CreateAppBundle">
    <PropertyGroup>
      <PlistFilePath>$(AppBundleDir)/Info.plist</PlistFilePath>
      <OsuVersionKey>OsuVersion</OsuVersionKey>
    </PropertyGroup>
    <Exec Command="bash -c &quot;(/usr/libexec/PlistBuddy -c 'Print :$(OsuVersionKey)' '$(PlistFilePath)' &gt;/dev/null 2&gt;&amp;1 \
                                 &amp;&amp; /usr/libexec/PlistBuddy -c 'Set :$(OsuVersionKey) $(Version)' '$(PlistFilePath)') \
                                 || /usr/libexec/PlistBuddy -c 'Add :$(OsuVersionKey) string $(Version)' '$(PlistFilePath)'&quot;"/>
  </Target>
</Project>