Cloud build - IPA - Asset validation failed - Invalid bundle

Hello. I have issues at releasing the app on App Store: Xcode 15.2(Experimental), Unity 2020.3.37f1
Asset validation failed Invalid Bundle contains disallowed file ‘Frameworks’.

I have tried adding this file also trying to disable/enable the embed swift libraries but it doesn’t seem to work:

using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
namespace Editor
{
    public static class XcodeSwiftVersionPostProcess
    {
        [PostProcessBuild(999)]
        public static void OnPostProcessBuild(BuildTarget buildTarget, string path)
        {
            if (buildTarget == BuildTarget.iOS)
            {
                ModifyFrameworks(path);
            }
        }
        private static void ModifyFrameworks(string path)
        {
            string projPath = PBXProject.GetPBXProjectPath(path);
            var project = new PBXProject();
            project.ReadFromFile(projPath);
            string mainTargetGuid = project.GetUnityMainTargetGuid();
            foreach (var targetGuid in new[] { mainTargetGuid, project.GetUnityFrameworkTargetGuid() })
            {
                project.SetBuildProperty(targetGuid, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "NO");
            }
            project.SetBuildProperty(mainTargetGuid, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "YES");
            string target = project.GetUnityMainTargetGuid();
            project.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
            //Unity Tests
            target = project.TargetGuidByName(PBXProject.GetUnityTestTargetName());
            project.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
            //Unity Framework
            target = project.GetUnityFrameworkTargetGuid();
            project.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
            project.WriteToFile(projPath);
        }
    }
}

Anyone has solution to this problem?
Thanks

I would try to see if “ALWAYS_EMBED_SWITFT_STANDARD_LIBRARIES” macro set to “No” by taking a look at last produced Xcode project. Also make sure that you are targeting “All” tab when you do that. Following thread explains it further.

https://forums.developer.apple.com/forums/thread/17732

Trying to execute clean build can be an another option. Delete generated Xcode files in build directory and give it a try again.

Hi there!

I’d suggest trying to build the IPA locally with the same macos and Xcode version to check if this issue happens.

If yes, then I’d suggest asking in the iOS platforms forum.