Post

Replies

Boosts

Views

Activity

How to hide the scroll bar in a SpriteView when Digital Crown is used
I am updating my Watch games to use SwiftUI and am using a SpriteView to render my SpriteKit SKScene. However, my games now show the scroll bar at the top right of the Watch screen when I turn the Digital Crown. This didn't happen in the old version. Is there a way to hide the scroll bar? I see that ScrollView has a showsIndicators option to turn off the scroll bar, but I can't find this for SpriteView. Does anyone have a workaround to remove the scroll bar? This is the code I am currently using to show my GameScene.   @State private var crownPosition = 0.0   var body: some View {         GeometryReader { reader in       SpriteView(scene: GameScene(size: reader.size, crownPosition: $crownPosition))         .focusable()         .digitalCrownRotation($crownPosition)     }   } Thanks!
2
0
2.9k
Jun ’22
GameKit not working with watchOS 9
Game Center seems to have stopped working with watchOS 9. I've received support emails from users who have upgraded and can no longer see their score. I have also confirmed on my own Watch. I call this function in the ContentView using onAppear on my main view.   public func authenticatePlayerWatch() {     GKLocalPlayer.local.authenticateHandler = { error in       if GKLocalPlayer.local.isAuthenticated {         self.gameCenterEnabled = true       } else {         print(error?.localizedDescription ?? "Unknown error")       }       print(">>>> -- GKLocalPlayer.local.isAuthenticated = \(GKLocalPlayer.local.isAuthenticated)")     }   } But GKLocalPlayer.local.isAuthenticated is always false. It used to work on Watch (though intermittently) but now doesn't work at all. The iOS implementation works fine. Anyone else have this issue and perhaps found a way to make it work on watchOS?
4
0
1.7k
Oct ’22