I am testing an IOS app with Xcode inbuilt UI test cases which is working fine , i have enabled code coverage which reports third party cocoa pods library in code coverage report , I want to know how to exclude third party libraries from code coverage report.
How to exclude third party pods libraries from XCode UI test coverage report
Asked Answered
This might help: https://mcmap.net/q/507885/-code-coverage-with-cocoapods-library-ios-unit-test –
Orchestrion
You should disable the Code Coverage for the Targets that you don't want to be covered. If you want all of your pods to not be included in the code coverage you can add on your podfile
# Disable Code Coverage for objc Pod projects
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_CODE_COVERAGE'] = 'NO'
end
end
end
Run 'pod install' to apply the changes.
NOTE: This only works for objc pods. I haven't found a solution for Swift pods yet.
© 2022 - 2024 — McMap. All rights reserved.