"Keep going with Apps" Color Picker ERROR

Was doing the tutorials from Swift Playgrounds new lesson "Keep going with Apps" and on the "Bindings" chapter was asked to put a ColorPicker view.

To see the color options I should run the app instead of seeing it in the preview. I tried to do that but I don't get a response from Playgrounds...

Has someone had the same problem while doing this lesson?

Post not yet marked as solved Up vote post of orochamartins Down vote post of orochamartins
3.2k views
  • I am also getting this error. Is the color picker supposed to be black? I understand it may not update in preview, but I can't see anything when running the app in the separate window, just text that says "Content View".

Add a Comment

Replies

I am currently encountering the same issue. Would love to know I there is a solution to this.

I just went through this section and didn’t have any problems. The color picker appeared and worked as expected in both preview and running. This is on iPad. What exactly is happening? Is running never starting the app?

Same problem here.

Also experiencing this same issue on macOS Monterey 12.5. I've tried a couple workarounds like changing the variable and initial value of the color property wrapper, and so far nothing changes the behavior. The color picker "clicks" in the preview but nothing else happens.

im stuck, I want to keep learning but can't find an answer to this

  • same issue here, all I have is a black image after running the ColorPicker.

Add a Comment

I had the same issue. I loaded the app in Playgrounds (on my Ipad) and the color picker showed up in the preview window... without any problems, finished lesson and went back to Mac. I think the issue is with Playgrounds on MacOS...

Same here, doesn't work on an M1 Macbook Air.

Getting the same error on the M1 Macbook Pro

I just ran into this same issue. The issue is that the colorpicker does not run in the preview pane, only in the app. If you are using Playground on a Mac (can't speak to iPad), there is a right-arrow button/play button at the top of the left pane. Click this, and it will open your code as an app, and the colorpicker works at that point.

  • Attempted to do this, but still didn't work on Mac. Just got a black screen with the words content view, and dance under them.

Add a Comment

I have the same problem. If I use the iCloud file sync and open the same project on my iPad pro, it works just fine. Then I come back to the M1 MBP and it fails.

If, on the other hand, I try to "Run" the app, all I see is this (again, on the Mac, the iPad works fine)

If you go to the MyApp Swift File you change where it says ContentView() into Bindings(). I guess MyApp is the file that runs when you press the triangle run button.

  • To clarify, my reply above is a solution to the problem.

  • YEEEESSS!!! This fixed it for me. Thanks!

  • Thank you, @joshuamcanete! This was driving me crazy.

Maybe this will help all of you my Friends!

  • I just encountered this issue and want to thank @molodoyhelovek for their answer. :-) It worked for me on the M2 MacBook Air.

  • Thank you, it was the case as well on the mac air m1, even though I somehow doubt it's about the architecture. Any explanation of these bindings, how can we now that it should be put there?

Add a Comment