Fix iOS builds not being able to read their deploy version

This commit is contained in:
Dean Herbert
2019-03-01 19:59:39 +09:00
parent deb0c06021
commit 9885913fff
4 changed files with 21 additions and 6 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using Foundation;
@ -10,6 +10,6 @@ namespace osu.iOS
[Register("AppDelegate")]
public class AppDelegate : GameAppDelegate
{
protected override Framework.Game CreateGame() => new OsuGame();
protected override Framework.Game CreateGame() => new OsuGameIOS();
}
}

14
osu.iOS/OsuGameIOS.cs Normal file
View File

@ -0,0 +1,14 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using Foundation;
using osu.Game;
namespace osu.iOS
{
public class OsuGameIOS : OsuGame
{
protected override Version AssemblyVersion => new Version(NSBundle.MainBundle.InfoDictionary["CFBundleVersion"].ToString());
}
}

View File

@ -48,6 +48,7 @@
<ItemGroup>
<Compile Include="Application.cs" />
<Compile Include="AppDelegate.cs" />
<Compile Include="OsuGameIOS.cs" />
</ItemGroup>
<ItemGroup>
<LinkDescription Include="Linker.xml" />