An empty folder named 'Frameworks' in UnityFramework.framework

Unity 2019.3.0b3 to build an iOS framework => UnityFramework.framework

There is an empty folder in UnityFramework.framework named “Frameworks”, and it shows message
ERROR ITMS-90206: “Invalid Bundle. The bundle at ‘YOUR.app/Frameworks/UnityFramework.framework’ contains disallowed file ‘Frameworks’.”

After remove the empty folder, it passed the AppStore checking.

3 Likes

Can confirm this is still happening on Unity 2019.3.0f5 (2019.3.0 Release Candidate 5)

It appears to be a specific issue with CocoaPods (Our project uses GoogleVR for Unity, which requires Pods to compile to iOS.)

It is painful to be unable to use Cloud Build for distribution builds at the moment, and we don’t quite have the bandwidth at the moment to cook up a build postprocess script to resolve this automatically (especially if Unity is just going to fix it soon).

Right now, it appears that the workaround that works for us follows this StackOverflow answer: ios - Validation Error: Invalid Bundle. The bundle at ... contains disallowed file 'Frameworks' - Stack Overflow

We go into the UnityFramework target of the main project in XCode, and delete the Build Phase called [CP] Embed Pods Frameworks.

Even if the solution is simply to update CocoaPods, Unity would have to do so as well on their Cloud Build machines because their IPAs are running into this issue at the upload phase…

Hope this post helps!

4 Likes

We got the same issue

@MultivariousDev01

Which of the soltutions in your link did you use for the Unity Cloud build?

We have no macs so manually manipulating the xcode files is not really an option.

We use a third party sdk which does manipulate the xcode file like

project.AddBuildProperty(targetGUID, “ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES”, “YES”);

But the solution in the link mentioned something about "ON extension lvl “NO”

How exactly is this solution done for Unity?

ok this solution worked for us

project.AddBuildProperty(targetGUID, “EMBED_SWIFT_STANDARD_LIBRARIES”, “NO”);
project.AddBuildProperty(mainGameGUID, “EMBED_SWIFT_STANDARD_LIBRARIES”, “YES”);

2 Likes

Seeing this in 2020.1. @Dazo1985 What is the targetGUID value in this example?

Could you add the context to what targetGUID, and mainGameGUID are?
I’m confused with the xcode file structure

Legend! this worked for me, thanks a lot :slight_smile:

Workaround.
Right-click on the archive in organizer → Show in Finder
Right-click on the .xcodearchive file → Show package contents. Go to folder Products/Applications/
Right-click on the .app file → Show package contents. Go to the folder Frameworks/UnityFramework.framework/
Delete folder named Frameworks. (The one inside UnityFramework.framework folder! See my screenshot)

After this the Validation is successful. Apple approved my game just now, so I guess it’s safe =)

EDIT:
Before archiving the build you have to set “Always Embed Swift Standart Libraries” to YES for the Unity-iPhone target


29 Likes

This didn’t work for us. We had to downgrade Facebook SDK to v7.19.2 and then Apple accepted the binary (unity version 2020.1.6f1).

I’ve updated my post. Turned out you had to set “Always Embed Swift Standart Libraries” to YES for the Unity-iPhone target

Thank you tried your solution before the edit and got rejected. Trying again after edit.

Any updates?
Have you been rejected by Apple after their review? Or the build has been rejected by Xcode during validation?

1 Like

I had the issue now with the version 2020.1.10f1 , and it helped me! many thanks.

1 Like

this also worked for me, thanks for sharing :slight_smile:

1 Like

Ok, just updated our project to Unity 2020.1.17f1 from 2019.4.17f1 and we are now facing these error as well.
We get the following error on Unity Cloud Build, when trying to upload to the App Store:

1112: 2021-01-20 15:40:53.158 altool[18362:67827]  Error:
1113: [2021-01-20 15:40:52 UTC] <main> DBG-X:   parameter ErrorCode = 1102
1114: [2021-01-20 15:40:52 UTC] <main> DBG-X:   parameter ErrorMessage = ERROR ITMS-90206: "Invalid Bundle. The bundle at 'gouda.app/Frameworks/UnityFramework.framework' contains disallowed file 'Frameworks'.
1115: [2021-01-20 15:40:52 UTC] <main> ERROR: ERROR ITMS-90206: "Invalid Bundle. The bundle at 'gouda.app/Frameworks/UnityFramework.framework' contains disallowed file 'Frameworks'."
1116: [2021-01-20 15:40:52 UTC] <main> DBG-X: The error code is: 1102
1117:         ERROR ITMS-90206: "Invalid Bundle. The bundle at 'gouda.app/Frameworks/UnityFramework.framework' contains disallowed file 'Frameworks'."
1118:     "Error Domain=ITunesTransporterErrorDomain Code=-18000 \"ERROR ITMS-90206: \"Invalid Bundle. The bundle at 'gouda.app/Frameworks/UnityFramework.framework' contains disallowed file 'Frameworks'.\"\" UserInfo={NSLocalizedRecoverySuggestion=ERROR ITMS-90206: \"Invalid Bundle. The bundle at 'gouda.app/Frameworks/UnityFramework.framework' contains disallowed file 'Frameworks'.\", NSLocalizedDescription=ERROR ITMS-90206: \"Invalid Bundle. The bundle at 'gouda.app/Frameworks/UnityFramework.framework' contains disallowed file 'Frameworks'.\", NSLocalizedFailureReason=ERROR ITMS-90206: \"Invalid Bundle. The bundle at 'gouda.app/Frameworks/UnityFramework.framework' contains disallowed file 'Frameworks'.\"}"

I have found @Dazo1985 's reply below, but I’m not sure what mainGameGUID stands for.

Any help will be much appreciated.

1 Like

After 2 days, this saved me. I would buy you a beer if I could. Thank you very very very much!

1 Like

Yeah it’s saved me too. Thanks a lot.

Unity 2020.2.2f and Xcode 12.4 have same problem and this workaround solved problem.

Xcode 12.3 was just worked fine. I don’t know what was changed.

Hi all!
I tried the workaround and uploaded okay but got rejected :frowning: - Invalid Swift Support
Not sure what I stuffed up there but I had success with a fresh build by turning the swift embed option to “No” and leaving the folder as is.

Everything seems to be working okay ¯_(ツ)_/¯
(I’m on Unity 202.3 LTS by the way with Xcode 12.4)

1 Like

@petey your solution worked! I owe you many beers.

1 Like

Found solution. Add script below to Editor folder.

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");

            project.WriteToFile(projPath);
        }
    }
}
12 Likes