On my Unity project, I took several builds before without a problem. However, in this build, I integrated Facebook SDK and then this error (image1) started appearing when I try to upload it after archiving it on the Xcode workspace.
I also tried to upload it with Transporter, but Transporter also threw errors (image2).
When I build the project for IOS unity creates some files and there I found a UnityFramework folder, I think this folder is the mentioned folder in the error. However, there are only 2 files in this folder and none is named "Frameworks"(image3).
Here are the build options of the project at Xcode workspace (image4):
With the Android build of the app, everything is okay. This issue appears only with the IOS build.
Here's a visual representation of what you should do to resolve the "contains disallowed file 'Frameworks'" errors
in XCode projects exported from Unity
Or
If you don't want to configure this manually every time you build you can add this script in your project to do it automatically for you on each build:
using System;
using UnityEditor;
#if UNITY_IOS
using UnityEditor.iOS.Xcode;
#endif
using UnityEditor.Callbacks;
namespace SomeEditorNameSpace
{
// Automatically set the "Always Embed Swift Standard Libraries" option to "No" in UnityFramework Target in XCode
public static class DisableEmbedSwiftLibs
{
[PostProcessBuildAttribute(Int32.MaxValue)] //We want this code to run last!
public static void OnPostProcessBuild(BuildTarget buildTarget, string pathToBuildProject)
{
#if UNITY_IOS
if (buildTarget != BuildTarget.iOS) return; // Make sure its iOS build
// Getting access to the xcode project file
string projectPath = pathToBuildProject + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject pbxProject = new PBXProject();
pbxProject.ReadFromFile(projectPath);
// Getting the UnityFramework Target and changing build settings
string target = pbxProject.GetUnityFrameworkTargetGuid();
pbxProject.SetBuildProperty(target, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "NO");
// After we're done editing the build settings we save it
pbxProject.WriteToFile(projectPath);
#endif
}
}
}
Then you can Archive & Validate your build without any errors. Hope my answer helped.