I have an old Xcode project that I am adding tests to, and at a high level I see the code coverage percent (the 2.2% number). However, in the detail view, code coverage only shows on the testing bundle, not in the main app bundle.
Anyone have any tips on how to fix this?
Just wanted to come back here in case my solution helps others.
As I mentioned, the project in question is very old (prob 10 years at this point). I have updated it over the years, but....yeah.
To start I created a brand new Xcode project with Xcode 16.3. Then I opened my old project and the new project, showing the build settings in 'Levels' view, so I could see each setting and where it is modified. I meticulously went thru each setting comparing my old project to the new project and changed my old project to match the new project (where it made sense, for example, I can't use script sandboxing).
After going thru this process. My coverage works!!!!!
I am not 100% exactly which setting it was, but I noticed that several of setting differences were quite suspicious. Stuff like the C/C++ language dialects being different? The 'Active Compilation Conditions', 'Compilation Mode' and 'Optimization Level'....all were different.
As I said, not sure which setting it was exactly. But to anyone having issues. I recommend this as a process. Just got to buckle down and go setting by setting till you find the magic one!
-pj