How to calculate code coverage for iOS app using TestNG


I am using Appium+Java(Testcases)+TestNG(Framework).
As I am fairly new to Mobile automation, i dont have enough idea baout how to go for Code coverage.
Can someone please point me, how can I achieve this with given set of technologies.

Instead of code coverage why don’t you use Cucumber + appium and to inform how many “User Stories” are covered at UI level.

IMHO code coverage should be done at unit level and it’s developer’s task and not QA engineer’s

Thank you, Vikram for the suggestion!
We, however, need to calculate CC as a part of the deliverable. It’s a part of our Done-Done criteria.

You wrote 100 manual cases. Automated 20. Your test coverage 20%.

Unfortunately, demand is little complex.
I need a coverage report containing Condition coverage/Function coverage and so on.

Did you happen to figure out, how to get the code coverage?