Swift Playgrounds warning when containing visionOS conditional code.

I'm getting the following error when previewing my Swift Playground package:

Unrecognized platform name 'xrOS'; did you mean 'iOS'?

Anyone know how to silence this? I don't have xrOS anywhere in my code so I'm guessing this is something with Swift Playgrounds or with the compiler.

Replies

I don't have xrOS anywhere in my code

xrOS is a compatibility synonym for visionOS. I presume you have visionOS code in your playground?

Also:

  • Is this Xcode or the Swift Playgrounds app?

  • What version of that?

  • How do you create your playground?

  • And can you post a small snippet that reproduces the issue?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"