0

I'm new to swift playground, and I tried to create a instance of Type like Scene or Graphic. But every time I try it keep saying cannot find 'Scene' in scope or cannot find 'Graphic' in scope. enter image description here

What I am missing here? Thanks

Max Wells
  • 79
  • 4
  • 1
    Is graphic a custom type you built yourself? If yes, where is it declared? If no, did you forget to import the appropriate framework? – Mahdi BM Apr 12 '21 at 13:34
  • In the default file in Playground called 'Blu's Adventure', in main code section they declared just like 'let blu = Graphic(image:n )'. without declaring new types or importing any stuff. Maybe the Type called Graphic doesn't exist in swift but made to work in the 'Blu's Adventure' to teach how type and instance work – Max Wells Apr 12 '21 at 13:40

1 Answers1

2

If you're using Xcode 12.5 beta, try to enable import App types from the right menu (you can open the right menu using the top right corner button). I think that should solve the problem, but i could be wrong.
Also read this answer by Vitali

Mahdi BM
  • 1,826
  • 13
  • 16