New project with new AppIntent throws build error

I opened a new project, iOS app, in XCode and then tabbed into the system_search snippet and built the project and got a build error. I can't imagine this was intended, at least not for new developers to the ecosystem like me.

I solved it by tweaking a configuration I don't really understand advised here: https://github.com/apple/swift-openapi-generator/issues/796, hopefully that's a valid workaround

To see what happened here, I used Xcode 26.4 beta 3 to create a new multi-platform app. I added a new file, added an import statement for App Intents, and then copied in the snippet of getting started code from the documentation. Indeed, this fails to compile.

That new project's default build setting configuration is:

  • Swift Langage Version: Swift 5
  • Approachable Concurrency: Yes
  • Default Actor Isolation: MainActor

To allow this to compile, I change the Default Actor Isolation build setting to nonisolated instead.

This is worth a bug report — please use Feedback Assistant to report it, and post the FB number here so I can follow up on it.

— Ed Ford,  DTS Engineer

New project with new AppIntent throws build error
 
 
Q