Hey! So I finally had time to properly test that ObjectReferenceAnalyser tool you were asking about—the one for tracking down memory leaks and retain cycles in Swift/ObjC apps. Wanted to share a weird attachment issue I hit, because it's exactly the kind of thing that'll waste an afternoon if you're not expecting it.

First impressions: this thing is powerful. The live memory graph visualization is like having Xcode's Memory Debugger on steroids—you can see every object instance, every reference, in real time. I attached it to a test app with a known retain cycle (a closure capturing self strongly), and the cycle was highlighted in red within seconds. Way faster than digging through Instruments.

But here's where it got annoying: I tried to attach it to an actual production app we're working on, and it just... wouldn't connect. The app launched fine, ObjectReferenceAnalyser showed "Waiting for target," then nothing. No errors, no timeout—just perpetual waiting.

My first dumb move: I figured it was a code signing issue or something. Checked debug symbols, recompiled with different settings, even tried a different app. Same result.

What I eventually realized after digging through console logs: it's the hardened runtime permission. ObjectReferenceAnalyser uses low-level debugging APIs that require special entitlements. If your target app has the hardened runtime enabled (which most production apps do), it blocks the analyser's attachment unless you explicitly allow it.

What actually fixed it:

  1. In Xcode, went to the target app's Build Settings
  2. Searched for "Hardened Runtime"—it was enabled
  3. Added a new entitlement: com.apple.security.cs.disable-library-validation set to YES
  4. Rebuilt the app, relaunched, and ObjectReferenceAnalyser attached immediately

Here's Apple's docs on hardened runtime and library validation. The official ObjectReferenceAnalyser guide has a section on this too.

Quick checklist if you try it:

  • ✅ If the analyser won't attach, check if your target app has hardened runtime enabled
  • ✅ Add the com.apple.security.cs.disable-library-validation entitlement (set to YES)
  • ✅ For App Store builds, you'll need to remove this entitlement before distribution—it's for debugging only
  • ✅ The analyser works perfectly with debug builds out of the box—this is only for production-style builds
  • ✅ Once attached, the performance overhead is surprisingly low—I barely noticed it running

I found this page with the download and requirements—clean source, provides SHA-256 checksums. The Mac App Store version might have different entitlements (sandboxed).

Once I got past the attachment issue, the tool is genuinely indispensable. The heap snapshot comparison caught a subtle leak in a notification observer that Instruments had missed entirely. The visual graph showed exactly which objects were being retained and why.

Anyway, if you're doing any serious iOS/macOS development, this is worth adding to your toolkit. Just remember that hardened runtime entitlement for production-style apps, or you'll be staring at "Waiting for target" forever. Let me know if you try the Combine publisher analysis—I haven't dug into that yet but heard it's solid.

Catch you later!

Edit

Pub: 27 Feb 2026 15:33 UTC

Views: 5