GameCenter causes hiccup when showing access point

Hello,

In our Unity game, we've started experiencing application hiccup as a result of calling [[GKAccessPoint shared] setActive:YES]. The call itself does not take much time, but it seems to trigger something that causes a significant app stall causing running animations and transitions to feel laggy. This is new behaviour for us in iOS 16.1, as it did not cause any hiccups on 16.0 or earlier as far as we've noticed. We've tested the same build on 16.0 and 16.1, and it's working smooth on 16.0. The hiccup is present both when logged in and not logged into GameCenter.

Did something change in 16.1 that requires us to use this API in a different way, or is it a (known) bug in iOS? My searches have not resulted in any similar reports.

Best,

-Trond

Post not yet marked as solved Up vote post of trond-a Down vote post of trond-a
1.2k views

Replies

Any luck on this? I see a similar thing - most obviously on bad networks. Appears that main thread is getting locked.

Bump - Noticing this as well on 16.5.1

I found that setting the parentWindow property fixes the stutter I was experiencing. Specifically in my GameKit helper where I configure the game's root window I also set this property:

func configure(with window: UIWindow?) {
    self.window = window
    
    if #available(iOS 14.0, *) {
        GKAccessPoint.shared.location = .bottomTrailing
        GKAccessPoint.shared.showHighlights = false
        GKAccessPoint.shared.parentWindow = window
    }
}