For the ones that have that issue, simply add -destination 'generic/platform=iOS' in your command
xcodebuild -project appcommons.xcodeproj -scheme build-framework -configuration Release -destination 'generic/platform=iOS' clean build
That will remove --platform macosx and set the correct --minimum-deployment-target 13.1 from ibtool command line