0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Unity][IOS] ITMS - 90109に泣かされる

Posted at

開発環境
Mac OS Catalina 10.15.7
Unity 2019.4.10.f

#問題点
なんか今まで動いていたのにこんなエラーが出てきた。
出てきた原因の方が知りたい・・・

Terget Minmum iOSversionを一度変えたからか??

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:

#解決策

UIRequiredDeviceCapabilities を消せよとのことらしい。ので
コンパイル時に勝手に消すスクリプトを探してきて実装する。
(いままで入ってなかったから動いてなかったのか他の原因なのかは不明)


// 実際に使ったやつの一部抜粋
public class HogeHoge : IPostprocessBuildWithReport
{

     /// 実行順を指定(0がデフォルト、低いほど先に実行される
    public int callbackOrder => 1;

    //このクラスを用意すれば勝手にビルド後に動く
    public void OnPostprocessBuild(BuildReport report)
    {
#if UNITY_IOS
        if (report.summary.platform == BuildTarget.iOS)
        {
            // InfoPlistから不要な物を取り除く
            RemoveArm64FromRequiredDeviceCapabilities(pathToBuiltProject);
        }
#endif
    }

    internal void RemoveArm64FromRequiredDeviceCapabilities(string pathToBuiltProject)
    {
     //infoPlistを読み込む
        string plistPath = Path.Combine(pathToBuiltProject, "Info.plist");
        var plist = new PlistDocument();
        plist.ReadFromString(File.ReadAllText(plistPath));
        var rootDict = plist.root;

        //【今回の肝】 UIRequiredDeviceCapabilities の中身を消す
        var capabilities = rootDict["UIRequiredDeviceCapabilities"].AsArray();
        capabilities.values.Clear();
        //capabilities.values.RemoveAll(item => item.AsString() == "arm64"); //こんな感じで個別ににも消せる

        File.WriteAllText(plistPath, plist.WriteToString());
    }
}

#解決策できなかった策
・Auto Graphics APIにOpenGLES3 と OpenGLES2 を追加する
 →エラーのまま特に変わらず
スクリーンショット 2020-12-22 13.23.20.png

参考資料
https://staff.qualias.jp/technology/this-bundle-is-invalid-the-key-uirequireddevicecapabilities-in-info-plist-may-not-contain-values-that-would-prevent-this-application-from-running-on-devices-that-were-supported-by-previous-version/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?