Created
December 15, 2016 07:35
-
-
Save drZool/2aef2d7ef9963cb06caa1f4aab94932b to your computer and use it in GitHub Desktop.
Prior 5.2.2p1 ios build would fail upload to testflight/appstore if info.plist did not have UIRequiresFullScreen = true. This fixes that
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.IO; | |
| using UnityEngine; | |
| using UnityEditor; | |
| using System.Collections; | |
| using UnityEditor.Callbacks; | |
| #if UNITY_IOS | |
| using UnityEditor.iOS.Xcode; | |
| #endif | |
| public class IosPostBuild { | |
| [PostProcessBuild] | |
| private static void OnProcessPostBuild (BuildTarget buildTarget, string path) | |
| { | |
| #if UNITY_IOS | |
| if (buildTarget == BuildTarget.iPhone ) { | |
| // Add url schema to plist file | |
| string plistPath = path + "/Info.plist"; | |
| PlistDocument plist = new PlistDocument(); | |
| plist.ReadFromString(File.ReadAllText(plistPath)); | |
| // Get root | |
| PlistElementDict rootDict = plist.root; | |
| rootDict.SetBoolean("UIRequiresFullScreen",true); | |
| plist.WriteToFile(plistPath); | |
| } | |
| #endif | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment