79774177

Date: 2025-09-24 21:01:17
Score: 1.5
Natty:
Report link

Does this code exist in a new project created in Xcode 26? If so, new projects are set to use global actor isolation & approachable concurrency. Here's one place where you can read a discussion about it: https://www.donnywals.com/should-you-opt-in-to-swift-6-2s-main-actor-isolation/

For future posts: it can be important to state which Xcode you're using and which version of Swift (e.g. 6.2).

For this issue, removing your use of Task.detached within the increment method should unblock you.

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: William Power