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’
Upload IPA to Appstore Connect failed
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);
}
}
}
I have also a post build bash
#!/bin/bash
echo “Uploading IPA to Appstore Connect…”
#Path is “/BUILD_PATH/<ORG_ID>.<PROJECT_ID>.<BUILD_TARGET_ID>/.build/last/<BUILD_TARGET_ID>/build.ipa”
path=“$WORKSPACE/.build/last/$TARGET_NAME/build.ipa”
if xcrun altool --upload-app -t ios -f $path -u $ITUNES_USERNAME -p $ITUNES_PASSWORD ; then
echo “Upload IPA to Appstore Connect finished with success”
else
echo “Upload IPA to Appstore Connect failed”
fi
Anyone has solution to this problem?
Thanks