replacing existing signatureやresource fork, Finder information, or similar detritus not allowedが発生した場合の対処法です。
エラーの内容
shell task (/usr/bin/xcrun codesign --force --sign - --preserve-metadata=identifier,entitlements /Users/xxxx-mac/Library/Developer/Xcode/DerivedData/what-edhwsfjtdkqhucghfkuqmhmdboxv/Build/Products/Debug-iphonesimulator/what.app/Frameworks/Alamofire.framework) failed with exit code 1: /Users/xxxx-mac/Library/Developer/Xcode/DerivedData/what-edhwsfjtdkqhucghfkuqmhmdboxv/Build/Products/Debug-iphonesimulator/what.app/Frameworks/Alamofire.framework: replacing existing signature /Users/xxxx-mac/Library/Developer/Xcode/DerivedData/what-edhwsfjtdkqhucghfkuqmhmdboxv/Build/Products/Debug-iphonesimulator/what.app/Frameworks/Alamofire.framework: resource fork, Finder information, or similar detritus not allowed Command /bin/sh failed with exit code 1
対処法
①ターミナルで該当の.xcodeprojのファイルがある箇所に移動
例えば、DeskTopのAppディレクトリの場合
cd DeskTop¥App
②下記のコマンドを実行
find . | xargs -0 xattr -c
③下記のコマンドを実行
sudo xattr -rc .
これでめでたくエラーが消えるはずです。