this GKAccessPoint code fails on macOS. The AccessPoint button appears, but disappears when clicked -- no modal window. works fine on iOS but not macOS. what am i doing wrong?
import SwiftUI
import GameKit
struct AccessPoint: View {
var body: some View {
ZStack {
Color.clear
Text("GKAccessPoint")
}
.onAppear() {
GKLocalPlayer.local.authenticateHandler = { viewController, error in
GKAccessPoint.shared.isActive = true
}
}
}
}