XCode ask: set auto-complete blocks to be weak by default

When I double-click an editor placeholder of a block in XCode, it helpfully fills it out for me. Problem is, sometimes I forget to go back and add [weak self] to the start of the block.

Now that XCode 12 is adding developer-friendly features, I'd like to see this get added - perhaps as a preference - that when I double-click to expand a placeholder that represents a block, it can add [weak self] for me.

Reasoning: it's instantly apparent if I use [weak self] when I should not, and it is an easy to find problem to fix. But it is really hard to figure out retain cycles and fix the opposite -- where i've accidentally created a strong reference that should have been weak.

Replies

If you haven't already, could you please report this feedback using https://feedbackassistant.apple.com (under "Developer Tools" > "Xcode") so we don't lose track of it. Thanks!