?????????????????
??????????д????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????漰???????????????????????????????????gcno???????????????????????е???????????gcda?????**?????濴?????????gcno?????gcda?????
????????gcno?????gcda???
????1????Scheme??????棬???TestCoverage??Build???

????2????Xcode??Build Setting????Generate Test Coverage Files?а?TestCoverage?????Yes??

????3????Xcode??Build Setting????Instrument Program Flow ?а?TestCoverage?????Yes??

????4?????????
??????????????????????????????- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions?????е??????·????????????main.m????е????
??
??void initTestCoverage(void)
????{
????const char* prefix = "GCOV_PREFIX";
????const char* prefixValue = [[QMFileHelper getSubPathAtDocuments:@"Coverage"] cStringUsingEncoding:NSASCIIStringEncoding];
????const char* prefixStrip = "GCOV_PREFIX_STRIP";
????const char* prefixStripValue = "14";
????setenv(prefix?? prefixValue?? 1);
????setenv(prefixStrip?? prefixStripValue?? 1);
????}
???????????????????????????????__gcov_flush()??????????????????????????????????????extern void __gcov_flush(void);
????5?????????gcno??gcda???
??????gcno??????????????????Xcode??product????μ?.app???????????“show in finder”??????????????Intermediates??????в???????????
????/Users/loyinglin/Library/Developer/Xcode/DerivedData/Live-abcabcababcabac/Build/Intermediates/Live.build/Debug-iphoneos/Live.build/Objects-normal
????gcda????????????????Xcode??????????е???У???Document??Coverage???????????????
????????????
????1??gcno??gcda??????????
???????Xcode?????????????????????1??2??3??????????
??????鰈??4?????????????
????????????gcno???????????gcda????????
????2?????????????????
????????????????′???
????Undefined symbols for architecture armv7:
????"___gcov_flush"?? referenced from:
??????鰈??2??3?????????????????????′???
????3??????___gcov_flush????
????___gcov_flush????????????????????????????????????????????
???????
??????Xcode?н??и????????????????????????????Xcode???????????????
???????????GCC Coverage?????????
????.gcno?????.gcda??????????lcov???н?????????????????????????????.gcno?y??zip -j result/gcno_arm64.zip dir/arm64/*.gcno ??dir?滻????????????д????????????MiniZipArchive?????????????????????????
????????????????????????????????
???????——???????
???????????????????y????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????????
???????????????????????????????iOS????????????????????????????л???????????????????????????????????????????????е?????