Fixed iPad share crash, updated iOS version to 3.5

This commit is contained in:
Anuken 2018-05-20 12:27:23 -07:00
parent b64cbc223f
commit a8bc2f10e4
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
app.version=1.0
app.version=3.5
app.id=io.anuke.mindustry
app.mainclass=io.anuke.mindustry.IOSLauncher
app.executable=IOSLauncher
app.build=5
app.build=6
app.name=Mindustry

View File

@ -85,6 +85,7 @@ public class IOSLauncher extends IOSApplication.Delegate {
NSURL url = new NSURL(to.file());
UIActivityViewController p = new UIActivityViewController(Collections.singletonList(url), null);
p.getPopoverPresentationController().setSourceView(UIApplication.getSharedApplication().getKeyWindow().getRootViewController().getView());
UIApplication.getSharedApplication().getKeyWindow().getRootViewController()
.presentViewController(p, true, () -> io.anuke.ucore.util.Log.info("Success! Presented {0}", to));