mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Add iOS URL Scheme support
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
// 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.Game;
|
||||
using osu.Framework.Threading;
|
||||
using UIKit;
|
||||
|
||||
namespace osu.iOS
|
||||
@ -16,9 +15,9 @@ 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));
|
||||
game.HandleUrl(url.AbsoluteString);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -107,5 +107,19 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UIFileSharingEnabled</key>
|
||||
<true/>
|
||||
<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>
|
||||
|
Reference in New Issue
Block a user