mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 19:45:43 +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:
commit
621f4387c9
@ -4,7 +4,7 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Foundation;
|
using Foundation;
|
||||||
using osu.Framework.iOS;
|
using osu.Framework.iOS;
|
||||||
using osu.Game;
|
using osu.Framework.Threading;
|
||||||
using UIKit;
|
using UIKit;
|
||||||
|
|
||||||
namespace osu.iOS
|
namespace osu.iOS
|
||||||
@ -16,9 +16,12 @@ namespace osu.iOS
|
|||||||
|
|
||||||
protected override Framework.Game CreateGame() => game = new OsuGameIOS();
|
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)
|
||||||
{
|
{
|
||||||
|
if (url.IsFileUrl)
|
||||||
Task.Run(() => game.Import(url.Path));
|
Task.Run(() => game.Import(url.Path));
|
||||||
|
else
|
||||||
|
Task.Run(() => game.HandleLink(url.AbsoluteString));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
<string>0.1.0</string>
|
<string>0.1.0</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||||
|
<true/>
|
||||||
<key>MinimumOSVersion</key>
|
<key>MinimumOSVersion</key>
|
||||||
<string>10.0</string>
|
<string>10.0</string>
|
||||||
<key>UIDeviceFamily</key>
|
<key>UIDeviceFamily</key>
|
||||||
@ -32,9 +34,9 @@
|
|||||||
<key>UIStatusBarHidden</key>
|
<key>UIStatusBarHidden</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>We don't really use the camera.</string>
|
<string>We don't really use the camera.</string>
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
<string>We don't really use the microphone.</string>
|
<string>We don't really use the microphone.</string>
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
@ -109,5 +111,17 @@
|
|||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</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>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
Loading…
Reference in New Issue
Block a user