Xccov-to-sonarqube-generic.sh fails with xcode 12

xccov-to-sonarqube-generic.sh is executed as part of a CI/CD pipeline and coverage reports are uploaded to sonarcloud.io. This was working fine with xcode 11, however it started failing after updating to xcode 12.

Error: Error Domain=XCCovErrorDomain Code=0 “Failed to create unarchiver” UserInfo={NSLocalizedDescription=Failed to create unarchiver, NSUnderlyingError={Error Domain=NSCocoaErrorDomain Code=260 “The file “Metadata.plist” couldn’t be opened because there is no such file.”

Is there an update for xccov-to-sonarqube-generic.sh

Hi Nizam I just found your problem on the internet because I had the same issue, check the newest version of the xccov-to-sonarqube-generic.sh file

and use it like this

bash xccov-to-sonarqube-generic.sh Build/Logs/Test/*.xcresult/ > sonarqube-generic-coverage.xml

btw for me the folder was different I use derivedData

like this

bash …/xccov-to-sonarqube-generic.sh …/derivedData/Logs/Test/*.xcresult/ > …/reports/sonarqube-generic-coverage.xml

1 Like