Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by jareds · Jun 08, 2015 at 09:10 PM · ioslayoutsplit-screen

iOS 9 and split screen mode

Apple recently announced split screen mode in iOS 9.

http://techcrunch.com/2015/06/08/apple-ipad-gets-split-screen-multitasking-in-ios-9/#.xmwp7y:FctY

From the article:

The best news, Federighi notes: “If you’ve adopted auto layout, this will all just work,” he says.

My question is, do Unity apps use auto layout? Can I expect my Unity iOS apps to "just work" with this new split screen mode? Has anyone tested the developer version of iOS 9 with Unity to see if this works?

Thanks! Jared

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Beamy · Aug 03, 2015 at 07:38 PM

Yes I was able to get split screen multitasking to work with my Unity app. I'm using an iPad Air 2 and Unity 5.0.3p3. You have to make sure that the following is true:

  • You are using an iPad Air 2 or newer

  • You're on iOS 9 (I'm on beta 4)

  • You have enabled all allowed orientations and autorotate (Portrait, Portrait Upside Down, Landscape Left, Landscape Right)

  • In the XCode project Info.plist file, you must have the "UILaunchStoryboardName" key pointing to the launch screen, default is "LaunchScreen"

The orientations can be simply set in Build Settings -> Player Settings -> iOS -> Resolution and Presentation

As for the the XCode project Info.plist file, you can automate it in the Post Build (http://docs.unity3d.com/412/Documentation/ScriptReference/PostProcessBuildAttribute.html).

Like so:

     using UnityEngine;
     using UnityEditor;
     using UnityEditor.Callbacks;
     using System.IO;
     using System.Collections;
     using System.Collections.Generic;
     using System.Xml;
     using System.Xml.Linq;
     
     public static class BuildPostProcessor {
     
        [PostProcessBuild(100)]
        public static void OnPostProcessBuild(BuildTarget target, string path)
        {
           // Unity renamed build target from iPhone to iOS in Unity 5, this keeps both versions happy
           if (target.ToString() == "iOS" || target.ToString() == "iPhone")
           {
           const string fileName = "Info.plist";
           string filePath = Path.Combine(path, fileName);
     
           string launchScreenName = "LaunchScreen"; 
     
           XmlReaderSettings settings = new XmlReaderSettings();
           settings.ProhibitDtd = false;
           XmlReader plistReader = XmlReader.Create(filePath, settings);
           
           XDocument doc = XDocument.Load(plistReader);
           XElement plist = doc.Element("plist");
           XElement dict = plist.Element("dict");
           PListDictionary xmlDict = new PListDictionary(dict);
           plistReader.Close();
     
           // Add relevant keys
           xmlDict["UILaunchStoryboardName"] = launchScreenName;
     
           // Corrected header of the plist
           string publicId = "-//Apple//DTD PLIST 1.0//EN";
           string stringId = "http://www.apple.com/DTDs/PropertyList-1.0.dtd";
           string internalSubset = null;
           XDeclaration declaration = new XDeclaration("1.0", "UTF-8", null);
           XDocumentType docType = new XDocumentType("plist", publicId, stringId, internalSubset);
     
           // Save
           xmlDict.Save(filePath, declaration, docType);
     
           }
      }
 }

Hope this helps!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by manny003 · Jun 09, 2015 at 02:06 PM

I just installed iOS9 on my iPad mini 1st Gen. Split screen is not supported on this device but I tried to run my game already on the App Store created with Unity 4.0 as well as the new final beta version of that same game created in Unity 5.0.2p4 (IL2CCP) -- both crashes soon after start-up.

Then again, this is only the first Beta of iOS 9 and still very early in the shake out process so I would not be surprised that there are crashes.

Manny

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image concordion2k · Jun 09, 2015 at 02:23 PM 0
Share

Just FYI - ensure your app supports 64-bit for iOS. iOS 9 seems to crash 32-bit only apps, as I discovered with my company's application this morning.

As of June 1st, any app updates submitted to Apple $$anonymous$$UST support 64-bit, as well.

avatar image manny003 · Jun 09, 2015 at 02:40 PM 0
Share

Right. I compiled using IL2CCP for 64bit support and it also crashed.

avatar image concordion2k · Jun 09, 2015 at 03:30 PM 0
Share

I installed iOS 9 on an iPad Air 2, and our IL2CPP build worked great. The one that did not build with IL2CPP support crashed.

avatar image manny003 · Jun 09, 2015 at 08:07 PM 0
Share

You know what really blows my $$anonymous$$d?

I just downloaded the newest version of HearthStone which supports 64 & 32 bit onto my iPad $$anonymous$$i(1st Gen) running the new iOS 9 Beta -- and played a match just fine (I lost). No crashes or obvious problems. Runs at about the same speeds as it did when I had iOS 7 on this same device.

As I understand it, HearthStone was made with Unity. And it's not a simple game either, by any stretch of the imagination.

How do those guys do it? They're freaks, I tell ya.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Lock keyboard layout iOs 1 Answer

fontSizeUsedForBestFit not working as expected on iOS? 0 Answers

Get the height of ios keyboard according to the unity units 1 Answer

Overriding Screen Orientation settings at runtime (iOS) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges