Thanks for the quick reply. I ran through the tutorials you mentioned and I understand, I need to extract that from the view - so I did.
In Swift Playgrounds, I added another file containing a single class with just the a declaration:
import PlaygroundSupport
import PlaygroundBluetooth
class ConnectionHandler {
//var centralManager: PlaygroundBluetoothCentralManager?
}
There is no link between a UI-Element and that class - just an additional Code-Snippet.
And that reproduces the problem - when I uncomment the declaration, playgrounds won't compile/start the app.
Unfortunately, there are no error messages/warnings/whatever.
Is that maybe a principle problem with Apps in Playground (not in Xcode)
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: