1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 21:23:19 +08:00

Improve iOS importing and file system (#5574)

Improve iOS importing and file system

Co-authored-by: Dean Herbert <pe@ppy.sh>
Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
This commit is contained in:
Dean Herbert 2019-11-05 15:12:01 +09:00 committed by GitHub
commit 621f4387c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 6 deletions

View File

@ -4,7 +4,7 @@
using System.Threading.Tasks;
using Foundation;
using osu.Framework.iOS;
using osu.Game;
using osu.Framework.Threading;
using UIKit;
namespace osu.iOS
@ -16,9 +16,12 @@ namespace osu.iOS
protected override Framework.Game CreateGame() => game = new OsuGameIOS();
public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
{
Task.Run(() => game.Import(url.Path));
if (url.IsFileUrl)
Task.Run(() => game.Import(url.Path));
else
Task.Run(() => game.HandleLink(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>
@ -32,9 +34,9 @@
<key>UIStatusBarHidden</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>We don't really use the camera.</string>
<key>NSMicrophoneUsageDescription</key>
<string>We don't really use the microphone.</string>
<string>We don&apos;t really use the camera.</string>
<key>NSMicrophoneUsageDescription</key>
<string>We don&apos;t really use the microphone.</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
@ -109,5 +111,17 @@
</array>
</dict>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>osu</string>
<string>osump</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
</dict>
</plist>