Text is showing error in Vision Pro os

Dear Apple Developer Forum Community, I hope this message finds you well. I am writing to seek assistance regarding an error I encountered while attempting to create a "Tic Tac Toe" application using Xcode. Upon launching Xcode and starting a new project, I followed the standard procedure for creating a simple iOS application. However, during the process, I encountered I am trying to make an app but the code showing an error when any player won the match. I have attempted to troubleshoot the issue by see two images, but unfortunately, I have been unsuccessful in resolving it. I am reaching out to the community in the hope that someone might have encountered a similar issue or have expertise in troubleshooting Xcode errors. Any guidance, suggestions, or solutions would be greatly appreciated. Thank you very much for your time and assistance.

Sincerely, Zipzy games

Hello @ZIPZYGAMES0,

I believe the "error" you are referring to is: "Result of 'Text' initializer is unused"

This is actually a "warning", not an "error" (Xcode uses yellow highlights for warnings, and red highlights for errors). The warning is telling you that the Text you initialized is not actually used anywhere else in your code, there are several ways that you could resolve this, but there isn't necessarily a single correct resolution for this warning. You know your project best, so you should decide if you intended to use this Text somewhere, or if you should just delete the line.

Text is showing error in Vision Pro os
 
 
Q