[펌] ITMS-90339: Deprecated Info.plist KEY - the Info.plist contains a key 'UIApplicationExitsOnSuspend'
Unity3D/Tips / 2019. 12. 11. 11:03
Unity Script에서 UIApplicationExitsOnSuspend Key 제거(with PostProcessBuild)
----
using UnityEditor;
using UnityEditor.Callbacks;
#if UNITY_IOS
using System.IO;
using UnityEditor.iOS.Xcode;
#endif
public class BuildProcessor
{
[PostProcessBuild(1)]
public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuiltProject)
{
#if UNITY_IOS
// Get plist
string plistPath = pathToBuiltProject + "/Info.plist";
PlistDocument plist = new PlistDocument();
plist.ReadFromString(File.ReadAllText(plistPath));
// Get root
PlistElementDict rootDict = plist.root;
// Set encryption usage boolean
string encryptKey = "ITSAppUsesNonExemptEncryption";
rootDict.SetBoolean(encryptKey, false);
// remove exit on suspend if it exists.
string exitsOnSuspendKey = "UIApplicationExitsOnSuspend";
if(rootDict.values.ContainsKey(exitsOnSuspendKey))
{
rootDict.values.Remove(exitsOnSuspendKey);
}
// Write to file
File.WriteAllText(plistPath, plist.WriteToString());
#endif
}
}
[출처] https://forum.unity.com/threads/the-info-plist-contains-a-key-uiapplicationexitsonsuspend.689200/
[참조] https://blog.naver.com/yoohee2018/221566174487
반응형
'Unity3D > Tips' 카테고리의 다른 글
[링크] UnityAndroidNotchSupport (0) | 2019.12.13 |
---|---|
[펌] Unity에서 iPhoneX 대응 NGUI의 UIAnchor에 SafeArea의 보정 처리를 넣어 보았다 (0) | 2019.12.11 |
[링크] Unity Notch(노치) 단말기 UI 설정 (0) | 2019.11.15 |
[펌] 클라이언트의 접속지역 정보를 Rest API로 받아오기. (0) | 2019.10.23 |
[펌] Unity3D AndroidManifest.xml 파일 Custom으로 수정하고자 할때 (0) | 2019.05.21 |