The correct approach is to set isReleasedWhenClosed = false on every programmatic window so that it follows ARC (Automatic Reference Counting) rules. The reason for this goes way back and a very helpful person on SO has helped me and explained it thoroughly.
Check it out
Post
Replies
Boosts
Views
Activity
Based on this post I used the pluginkit to run
pluginkit -v -m -D -i <extensionBundleId>
and removed the .app from all the paths it found (I had some old one lingering in an accidental .xcarchive).
This allowed me to Run the extension as a normal app, choose Finder as Host and successfully attach. (I suppose this approach can serve as a 'clean slate'?).
However the issue persists -> the debugger (or the extension, not sure which) crashes when I try to po something or show the Variables view.
[quote='789031022, DTS Engineer, /thread/756097?answerId=789031022#789031022']
If you choose Process > Detach, does it crash? And do you get a crash report?
[/quote]
Yes it does. The same crash. It just turns off, debug view dissapears and I get the:
"Couldn't communicate with a helper application."
Not sure if I get a crash report. Don't see anything in the Console.app.
Please bear in mind that this same exact scenario happens in a completely fresh new project with the Apple's boilerplate action extension code. I can run & attach but cannot debug.
Should I try the approach with the dummy appex host? How exactly would I create that target inside the appex project?
Based on a post i found I tried deleting
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
Which helped in the way that I can now Run the extension like a normal app, just choosing Finder as the host app. It hits the breakpoint but the same issue as above -> crash upon stepping over or upon usage of lldb.
I am not even sure I understand how to properly install new versions.
Right now it seems I have a remnant. The extension is shown upon right-click on an item in Finder and is also visible in the Quick Actions selection menu, even though the container app is not installed in the /Applications directory and the build folder is cleaned.
What is the best way to clean everything and making sure I have a clean slate?
To be on the same page it is an extension that just compresses and converts an image. I tried what you said -> I built the app, moved the .app from build to the /Applications directory (to have the latest, not sure if this is the correct approach?), launched it normally via the right click/quick actions and then I tried Debug > Attach to process and selected it from the likely targets. Xcode ran it again and attached the debugger but when I try to use the lldb to po context or just to step over for example it crashes with exit code 9.
@DTS Engineer
@eskimo How does one go about modifying stuff in the shared 'app grouped' plist if the defaults command does not support it? I would love to quickly modify, read & delete like I am normally used to with defaults. I found some workaround with killing cfprefsd but that's not working anymore. Direct modification in ~/Library/Group Containers/ does not work.
The content transition '.numericText(countsDown:)' that was introduced in iOS 16 does not work on iOS 16... is that a bug? Has anyone reported it? It does not matter if I wrap the value update inside a withAnimation block or not, it does not work. On iOS 17 it does, but I want backward compatibility.
Hello,
I am still experiencing this issue on iOS 13. Did anyone find a solution yet?