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’.
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.
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!
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:
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
Long story short:
Set “Always Embed Swift Standart Libraries” to YES for the Unity-iPhone target
Delete Framework folder inside your .xcodearchive (see picture)
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
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.