Is there any script that can detect Apple Submission to TestFlight errors early? like: ".framework contains disallowed nested bundles"

Some of the errors like ".framework contains disallowed nested bundles" we find out at later stage when uploading builds to TestFlight. It will be great if we can have similar script that apple uses or some custom script to verify it during the build time. So before I reinvent the wheel is there any script I can use at build time to detect this issue?

Is there any script that can detect Apple Submission to TestFlight errors early? like: ".framework contains disallowed nested bundles"
 
 
Q