14

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.

1

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.