Unable to export test result in Xcode 11.4 - ios

I am using following code to export test code coverage using Xcode11.4.
./xccov-to-sonarqube-generic.sh /DerivedData/MyApp-*/Logs/Test/*.xcresult/ > sonarqube-generic-coverage.xml
I am getting following error
This version of Xcode does not support opening result bundles created
with versions of Xcode and xcodebuild using the v1 API
Kindly help me with the proper way.

3 work arounds here for this as for as my research:
There is an update to xccov-to-sonarqube-generic.sh script for Xcode 11+. Try using this
https://github.com/SonarSource/sonar-scanning-examples/blob/master/swift-coverage/swift-coverage-example/xccov-to-sonarqube-generic.sh
Use Code Coverage Converter (cococo) utility to generate sonar's xml file format. Refer for more info:
https://medium.com/monsterculture/cococo-code-coverage-converter-from-xcode-11-to-sonarqube-7f48cff97b9b
Any shell script that is capable to convert Xocde 11+ *.xcresult file to sonar's xml file format

Related

sonarqube mixed obj-c swift project, how scan is done for code coverage

According to the docs, both the swift and Obj-C sonar scanners want code coverage data and in different ways (build-wrapper vs xccov). But this got me thinking, code coverage is for an entire target/project in xcode, not just files for a particular language. So for a mixed Obj-C and swift project, does SonarQube want the same entire-project-xcode-generated coverage data twice (once per scanner)? If not, how does it relate code coverage for a particular language in a sonar project, or does it not care at all?
Only asking this because again, and much to my surprise, the docs for the 2 scanners list different code coverage instructions, leading the user to wonder if each scanner doesn't expect the data to be mixed together like it is with xcode and a mixed obj-c swift project (i.e. its the same data)
Even i am facing same scanario. What we are currently doing is we setup build-wrapper utility as indicated at https://docs.sonarqube.org/latest/analysis/languages/cfamily/.
So, initially it worked fine for a month or so. Later, we start getting following error:
====================================================================================
02:36:25.658 INFO: ------------------------------------------------------------------------
02:36:25.658 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
* you are using the latest version of the build-wrapper and the SonarCFamily analyzer
* you are correctly invoking the scanner with correct configuration * your compiler is supported
* you are wrapping your build correctly
* you are wrapping a full/clean build
* you are providing the path to the correct build-wrapper output directory
====================================================================================
So, we have decide to install a backelite plug-in / jar (that handles sonar coverage reports for a mix of Swift and Objective-C) to our sonar server (Enterprise edition) , but, it led to the following error:
error message screenshot
So, basically you can set uo build wrapper utility and try performing the sonar scan. Make sure sonar-scanner is installed and you are passing relevant switches to the sonar-scanner command.

Can't convert .obj files to the new .usdz format

when trying to convert my .obj files to .usdz using command line, I can't find the generated file.
Screenshot showing the command line is not generating the file
I got a message saying the file was generated with success, but there's no generated file at all. :(
What I've done so far:
Updated my Xcode to Version 10.0 (10A255)
Updated 'USD' path environment variables, following USDPYTHON documentation. (export PATH=$PATH:/USD
export PYTHONPATH=$PYTHONPATH:/USD)
Using macOS High Sierra 10.13.6
Any clues on any step I missing to successfully convert a model to .usdz?
Note: When using a 3rd party tool, like https://vectary.com for example, I'm able to convert my .obj model.
Thanks!

Unable to find any .xccoverage file while running xcov with fastlane

This is what fastlane prints in console:
[10:25:55]: Unable to find any .xccoverage file.
[10:25:55]: Make sure you have enabled 'Gather code coverage' setting on your scheme settings.
[10:25:55]: Alternatively you can provide the full path to your .xccoverage file.
How can I force it to provide the full path to my .xccoverage file?
I am pretty sure Gather coverage is enabled;)
Using Xcode 10 and iOS 12, Swift 4.2
I've encountered this problem during migration to Swift 4.2 and XCode 10.
Did you update your xcov to version 1.5?
It resolved the problem for me.

Xenmobile IOS wrapping

I'm Trying to wrap a very simple Objective-C app all it does is display the Username to the screen if it's inside Citrix managed space otherwise it should write that it's not inside Citrix managed space.
However when I try to wrap it after Exporting the IPA file from Xcode. then I try to wrap that IPA file with the MDX toolkit. and this is what happens..
I have no Idea what to do to make this work ? I do not believe I've done any wrapping before this point. and I've just followed a tutorial from Citrix on youtube the newest one I could find.
it's called "Tutorial - Develop with Citrix WorxSDK part 1"
Edit
forgot to mention I'm using
Xcode 8.2.1
MDX toolkit 10.4.10
Newest Java jdk I could pull
I found the problem. MDX 10.4.10 is in my setup trying to wrap at compile time as I didn't supply the script in build phases it didn't know how to create the mdx file. which resulted in simply creating only the IPA file. The script creates a MDX file that I then later can imbed the IPA file into. this is the script that soleved it all for me:
export APPTYPE="Enterprise"
export STOREURL="http://example.com"
export DATE=`date +%Y-%m-%d_%H-%M-%S`
export POLICYFILE="/Path/to/Policyfile.xml"
/Applications/Citrix/MDXToolkit/CGAppCLPrepTool SdkPrep -in "${CODESIGNING_FOLDER_PATH}" -out "/Users/Udvikling/Documents/Debug Builds/${EXECUTABLE_NAME}_${DATE}.mdx" -storeUrl "${STOREURL}" -appIdPrefix "ABCDEFGH" -policyXML "${POLICYFILE}" -appType "${APPTYPE}" -entitlements "${CODE_SIGN_ENTITLEMENTS}"

Is there anyway to generate coverage reports on sonar?

I'm working iOs app,which uses swift language.It's generating coverage.profdata successfully.But I would like to generate the same thing on SonarQube.
Please let me know if you have any ideas!!
I tried the below link
swift-sonar properties
The SonarQube Swift plugin does not have built-in support to import coverage results.
The only option (and the best one) for you is to use the Generic Coverage Plugin:
First you run your coverage tool to generate the coverage.profdata file
Then you manage to transform this file into the target format supported by the Generic Coverage Plugin
And finally you reference this new coverage file in your sonar-project.properties file (like explained in the documentation of the plugin)

Resources