When running a build in Xcode results in the error ‘Code signing fails with error ‘resource fork, Finder information, or similar detritus not allowed’

Use xattr -cr /app_directory to fix

Source: https://developer.apple.com/library/content/qa/qa1940/_index.html