- Home /
Unity 2019.2 to 2019.3 iOS App Upload error
Hey guys,
I updated my unity from 2019.2 tot 2019.3. However, now I want to update my app on the appstore, I get this error: ITMS-90109: This bundle is invalid - The key UIRequiredDeviceCapabilities in the Info.plist may not contain values that would prevent this application from running on devices that were supported by previous versions. Refer to QA1623 for additional information: https://developer.apple.com/library/ios/#qa/qa1623/_index.html
Does it have anything to do with the compatibility being changed to a minimum of iOS 10.0, while Unity 2019.2 supported earlier versions? When I try to switch back to the old Unity 2019.2 I get to many errors I know nothing about, so I can't test this out myself... how do I fix this, please help!
Answer by _Adriaan · Apr 26, 2020 at 03:09 PM
If you compare the UIRequiredDeviceCapabilities
array of keys in Info.plist
of the older version of the app (you can dive into the XCode archive that you used to upload the app) with the version of the new app you built, you'll find that they are different... and that's not allowed on the App Store. (It's dumb. I agree.) It's probably because of the added requirement of "metal"
. It was for me, at least.
You can either manually remove the extra key from the Info.plist inside XCode, or you can write a post processing script that fixes it. Here's an example of how to do that:
#if UNITY_IOS
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
public class PostProcessiOSInfoPlist : MonoBehaviour
{
[PostProcessBuildAttribute()]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
{
if(target != BuildTarget.iOS)
return;
string plistPath = pathToBuiltProject + "/Info.plist";
PlistDocument plist = new PlistDocument();
plist.ReadFromString(System.IO.File.ReadAllText(plistPath));
//remove capability keys to avoid Unity adding MORE capabilities (which is illegal on the App Store)
List<PlistElement> reqs = plist.root.values["UIRequiredDeviceCapabilities"].AsArray().values;
for (int i = reqs.Count - 1; i >= 0; i--)
{
if(reqs[i].AsString() != "armv7")
{
reqs.RemoveAt(i);
}
}
System.IO.File.WriteAllText(plistPath, plist.WriteToString());
}
}
#endif
Hope that helps.
you saved me, thanks! I had to also remove the arm7 from the target architectures in Xcode and boom could upload to the App Store. upgraded from unity 2018 to 2019.4.8
I tried this and worked perfectly. Thanks Adriaan. You saved me some hours that's for sure.