2019.3 - validation on upload to store gives "UnityFramework.framework contains disallowed file"

App runs on phone normally.
When trying to validate the app before uploading it to the store, this comes out:

Invalid Bundle. The bundle at ‘my.app/Frameworks/UnityFramework.framework’ contains disallowed file ‘Frameworks’

Unity 2019.3 Xcode 10.2

Help?

@Firewalker have you tried suggestions mentioned here?

any luck?

@Firewalker did you have any luck with this? I’m hitting the same issue.

1 Like

I have the same problem with Unity 2019.3.0f3 and Xcode 11.3. When I try to validate the app in the App Store, it gives me this error:

App Store Connect Operation Error
Invalid Bundle. The bundle at ‘my_app_name.app/Frameworks/UnityFramework.framework’ contains disallowed file ‘Frameworks’.

I could not find a solution yet.

1 Like

Can any one of you post a detailed folder structure of that UnityFramework.framework bundle you have issues with?

This error message could mean that there is embedded frameworks inside UnityFramework.framework. This may be an umbrella framework situation which Apple discourages.

It only had a .h file and a .plist file. I supose it must be some configuration option the one that gives troubles.

But I managed to send the app using the previous version of Unity (2019.2).

The UnityFramework is only added in the 2019.3 builds. It seems to be a framework library that then holds all the usual frameworks have always been added to the main target.

This seems to have been a design decision for 2019.3 - but not one that Apple seems to agree with!

2019.2 build structure

2019.3 build structure

I’m hitting this too!

@Dover8 - did you find a solution without downgrading Unity?

Manually setting Always Embed Swift Standard Libraries: NO setting as explained in Max MacLeod answer here got my bundle through validation. I’ve not run it on device yet to test the app works though:

3 Likes

‘Always Embed Swift Standard Libraries’ is defaulted to NO for each target in xcode for me. It was YES for you?

This seems to still be a problem with 2019.3.10f. Reverting to 2019.2. was the only solution

Im using Vuforia and Mapbox so maybe one of these libraries cause this in the first place.

1 Like

Hello Thanks to all for info.

Solution: reverting from 2019.3 to 2019.2. worked for me.

I can confirm the same issue on 2019.03.12f1.

Unfortunately since I ceated my project in 2019.03 originally downgrading is a real mess…

Managed to get it working without downgrade using the solution posted by MultivariousDev01 here: An empty folder named 'Frameworks' in UnityFramework.framework

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

1 Like

Setting

Always Embed Swift Standard Libraries

To ‘NO’ for the main app, UnityFramework and app extension (in my case keyboard extension) fixed this issue for me. I did this in code via:

pbxProject.SetBuildProperty(target, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "NO");
5 Likes

Where did you put this code ? Can it be used with Unity Cloud Build ?
Is the pre/post export method & pre/post build script area a place to look for ? I’ve never use it before, any guidance will be appreciated :slight_smile:

See my post here An empty folder named 'Frameworks' in UnityFramework.framework

Long story short:
Set “Always Embed Swift Standart Libraries” to YES for the Unity-iPhone target
Delete Framework folder inside your .xcodearchive (see picture)


13 Likes

You can use the following script to delete on each compilation the folder mentioned above.

cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Frameworks/UnityFramework.framework/"
if [[ -d "Frameworks" ]]; then
    rm -fr Frameworks
fi
4 Likes

This is correct, it solved my problem.Thank you!

In my case it helped to move all dylibs from UnityFramework.framework/Frameworks to Frameworks root in archive after build. And delete UnityFramework.framework/Frameworks also there.