Fix iOS importing

This commit is contained in:
DTSDAO
2019-08-05 22:30:35 +08:00
parent fb4f6dd27c
commit 0fe6585975
5 changed files with 18 additions and 18 deletions

View File

@ -1,6 +1,7 @@
// 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.Threading.Tasks;
using Foundation;
using osu.Framework.iOS;
using osu.Framework.Threading;
@ -17,7 +18,10 @@ namespace osu.iOS
public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
{
game.HandleUrl(url.AbsoluteString);
if (url.IsFileUrl)
Task.Run(() => game.Import(url.Path));
else
Task.Run(() => game.HandleUrl(url.AbsoluteString));
return true;
}
}

View File

@ -14,6 +14,8 @@
<string>0.1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>MinimumOSVersion</key>
<string>10.0</string>
<key>UIDeviceFamily</key>

View File

@ -3,12 +3,14 @@
using System;
using Foundation;
using osu.Framework.Platform;
using osu.Game;
namespace osu.iOS
{
public class OsuGameIOS : OsuGame
{
public override Storage GetStorageForStableInstall() => Storage;
public override Version AssemblyVersion => new Version(NSBundle.MainBundle.InfoDictionary["CFBundleVersion"].ToString());
}
}