Post

Replies

Boosts

Views

Activity

Reply to Code Coverage not showing properly?
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
Apr ’25
Reply to Code Coverage not showing properly?
Yeah the tests call into the application code and all the tests pass. And I verified the settings have code coverage on. The issue is that the project is so old, I feel like something is conflicting in the settings? I was very confused by the different settings that seem to affect code coverage (the scheme settings both when using test plans and when not, CLANG_ENABLE_CODE_COVERAGE, GCC_GENERATE_TEST_COVERAGE_FILES etc) But I hear you, it might just too complex to debug in the abstract. I was hoping there would be an easy solution, cause the tests do run, and I am seeing 'number go up' as I add tests. I just don't have access to file-based coverage. It seems to be just overall coverage stats (based on the image in the post).
Apr ’25
Reply to Modern collection view registration with Storyboards?
Claude31, your answer did put me on the right track. I realized that the real issue is that I don't think storyboards support compositional layouts just yet, and when you put a cell/view in a storyboard, it is somehow tied to the layout. I found that I could get visual design using a nib though, and then this code works: let headerRegistration = UICollectionView.SupplementaryRegistration<HeaderReusableView>(supplementaryNib: UINib(nibName: "HeaderReusableView", bundle: Bundle(for: HeaderReusableView.classForCoder())), elementKind: "header") { supplementaryView, elementKind, indexPath in             supplementaryView.titleLabel?.text = self.sections[indexPath.section].rawValue         }
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’21
Reply to Console app not showing info and debug logs
I know this has been an epic long running thread, but just to clarify: There is still a bug where debug messages from the simulator do not show up in the console app (I see them fine in Xcode's console & have the console app debug/info options on). Also see them if I use the 'xcrun simctl spawn log stream' command line that was posted a couple years back. There is no way to do filtering of os_log messages inside Xcode, that is only supported in the console app (where they don't show up due to the above issue) Thanks in advance! Just trying to decide if I want to invest in OSLog now. -pj
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’21