Post

Replies

Boosts

Views

Activity

GameKit Turn Based Matches Push Notifications
I'm developing a game that supports GameKit turn based matches. What I don't understand is this: Is tapping on the Game Center notification push messages the only way for the GKTurnBasedEventListener to trigger? What if someone misses the push message (swiping it away by accident or something like that) but still wants to join? Is there some inbox somewhere where the pending messages can be seen or fetched? Also it was mentioned in a very old WWDC video (from 2013, I think that's the latest with information about turn based matches) that the notification also includes a badge for the icon. However, I do not understand how to implement that. Is there any documentation for that?
3
0
564
1w
How does the automatch feature work in Game Kit?
I'm developing a turn based game. When I present the GKTurnBasedMatchmakerViewController players can opt in for automatch instead of selecting a specific friend as opponent. How exactly does the matching work if a player doesn't specify anything explicitly? Does Game Center send push notifications in a round robin fashion to all friends and the first one to accept is then matched as opponent? Is this documented somewhere?
3
0
347
1w
GKLeaderboard.loadLeaderboards returns empty array
After authenticating the user I'm loading my Game Center leaderboards like this: let leaderboards = try await GKLeaderboard.loadLeaderboards(IDs: [leaderboardID]) This is working fine, but there are times when this just returns an empty array. When I encounter this situation, the array remains empty for several hours when retrying, but then at some point it suddenly starts working again. Is this a known issue? Or am I hitting some kind of quota maybe (as I do it quite often while developing my game)?. Edit: My leaderboards are grouped in sets if that makes any difference here.
1
0
426
Dec ’25
How does Game Kit offline leaderboard submission work?
I do not understand how offline leaderboard submission is supposed to work in Game Kit: While the documentation briefly states that offline submission is supported, how is that even possible when you first have to fetch a leaderboard object in order to then call its submitScore function? How can I get the leaderboard object in the first place when offline? Can anyone enlighten me how this works? Or maybe point me to some relevant documentation?
0
0
343
Dec ’25
UIBarButtonItem alignment in UIToolbar on iOS 26 in UIDesignRequiresCompatibility mode
The screenshot is showing the same app deployed using Xcode version 26.0 beta 4 (17A5285i) on iOS 18.5 and on iOS 26.0. In iOS 26 beta 4 on the right the spacing of the UIBarButtonItem elements does not look good: The buttons are created like so: colorButtonText = [[UIBarButtonItem alloc] initWithImage:[UIImage systemImageNamed:@"paintbrush"] style:UIBarButtonItemStylePlain target:self action:@selector(drawingActionColor:)]; //... [drawingToolbarText setItems:@[colorButtonText, ...]]; Is this a known issue with the current iOS 26? Am I doing something wrong?
3
2
431
Oct ’25
UIToolbar in UINavigationController in UITabBar
My view structure in UIKit is like this: UITabBarController (with UITabBar) -> UINavigationController -> UIToolbar (by setting self.navigationController.toolbarHidden = NO). The toolbar is shown in red in the picture. I'm using it like so: self.navigationController.toolbarHidden = NO; self.toolbarItems = @[element1, element2]; This toolbar does work fine up to iOS 18.5 but it does not show up when compiling using iOS 26 Beta 3. Is this a bug? I don't see any deprecation in the documentation about it. Am I doing something wrong?
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
180
Jul ’25
Different behaviors of USB-C to Headphone Jack Adapters
I bought two "Apple USB-C to Headphone Jack Adapters". Upon closer inspection, they seems to be of different generations: The one with product ID 0x110a on top is working fine. The one with product ID 0x110b has two issues: There is a short but loud click noise on the headphone when I connect it to the iPad. When I play audio using AVAudioPlayer the first half of a second or so is cut off. Here's how I'm playing the audio: audioPlayer = try AVAudioPlayer(contentsOf: url) audioPlayer?.delegate = self audioPlayer?.prepareToPlay() audioPlayer?.play() Is this a known issue? Am I doing something wrong?
0
0
319
Jul ’25
Adjusting the width of a UISlider in self.navigationItem.titleView
I set the titleView of a view controller to a UISlider like so in viewDidLoad: UISlider *slider = [UISlider new]; self.navigationItem.titleView = slider; The desired outcome is that the slider takes the full width of the title view. This is working fine when the view is loaded in the wider landscape mode. The slider adjust its size as expected when rotating to portrait mode. However, when the view is loaded in the narrower portrait mode and then the device is rotated to landscape, the slider does not grow in width to make use of the newly available size. Why is that so and how can it get the desired outcome as described? After viewDidLoad: After rotating:
1
0
378
Mar ’25
requestWhenInUseAuthorization Crash iOS 18 Beta 4
When I call requestWhenInUseAuthorization in state kCLAuthorizationStatusNotDetermined on iOS 18 Beta 4 in the simulator, all my apps just terminate without any error message in the Xcode console (black screen with an activity indicator for a second or two and then it goes back to the springboard). I do have the NSLocationWhenInUseUsageDescription set in my Info.plist file. When running the exact same apps in Xcode 16.0 beta 4 (16A5211f) but with a iOS 17 simulator attached, it is working as expected by showing the location authorization dialog. Is this a known issue or am I missing something?
4
1
1.1k
Sep ’24
SwiftUI navigationDestination called twice
Xcode 16.0 beta 4 (16A5211f) iOS 18.0 beta 4 In SwiftUI, I have a TabView and a NavigationStack that contains a List in one of the tabs. In iOS 18 beta 4 simulator the following happens: when I first click on a different tab in the TabView and the back to the original tab and then click on a list item, navigationDestination is triggered twice. In the simulator, the destination detail view is pushed twice on the stack. This does not happen when running the same app with the same Xcode version but in iOS 17.0 simulator. It this a known bug or could it be some problem in my code? Unfortunately it's a bit difficult to exctract a simple example demonstrating the issue as this is a complex project.
1
1
749
Aug ’24
startAccessingSecurityScopedResource Crash
I have gotten the following crash now two times in an app that is otherwise used a lot and is running fine: Reason: -[NSNull startAccessingSecurityScopedResource]: unrecognized selector sent to instance 0x1f277c230 Stacktrace: ( 0 CoreFoundation 0x000000019c48087c B37A1273-B0C2-312E-9E0B-7143FB645C69 + 968828 1 libobjc.A.dylib 0x000000019479fc00 objc_exception_throw + 60 2 CoreFoundation 0x000000019c51119c B37A1273-B0C2-312E-9E0B-7143FB645C69 + 1560988 3 CoreFoundation 0x000000019c3c5ff8 B37A1273-B0C2-312E-9E0B-7143FB645C69 + 204792 4 CoreFoundation 0x000000019c506b10 _CF_forwarding_prep_0 + 96 5 UIKitCore 0x000000019edae6a8 F1A8BD61-9CF2-3054-B622-CB63D6CEB4CB + 8349352 6 QuickLook 0x000000020ea213b4 D43C66FB-A39B-304E-A81B-8ADBFAAE2882 + 308148 7 QuickLook 0x000000020ea415bc D43C66FB-A39B-304E-A81B-8ADBFAAE2882 + 439740 8 QuickLook 0x000000020ea3ff38 D43C66FB-A39B-304E-A81B-8ADBFAAE2882 + 433976 9 QuickLook 0x000000020ea40378 D43C66FB-A39B-304E-A81B-8ADBFAAE2882 + 435064 10 libdispatch.dylib 0x00000001a434f6a8 89420547-98A3-352A-AD2B-BBCB6006FB29 + 9896 11 libdispatch.dylib 0x00000001a4351300 89420547-98A3-352A-AD2B-BBCB6006FB29 + 17152 12 libdispatch.dylib 0x00000001a435f998 89420547-98A3-352A-AD2B-BBCB6006FB29 + 76184 13 libdispatch.dylib 0x00000001a435f5b0 _dispatch_main_queue_callback_4CF + 44 14 CoreFoundation 0x000000019c3cb20c B37A1273-B0C2-312E-9E0B-7143FB645C69 + 225804 15 CoreFoundation 0x000000019c3c7f18 B37A1273-B0C2-312E-9E0B-7143FB645C69 + 212760 16 CoreFoundation 0x000000019c3c7668 CFRunLoopRunSpecific + 608 17 GraphicsServices 0x00000001df7925ec GSEventRunModal + 164 18 UIKitCore 0x000000019e7e42b4 F1A8BD61-9CF2-3054-B622-CB63D6CEB4CB + 2278068 19 UIKitCore 0x000000019e7e38f0 UIApplicationMain + 340 20 MyApp 0x0000000102c06280 MyApp + 483968 21 dyld 0x00000001bee1adcc A795AD37-6266-385E-95E6-C1CA804C926E + 24012 ) The symbol MyApp + 483968 just resolves to the main() function. I'm not using this startAccessingSecurityScopedResource anywhere in my app. What could I do to debug this issue?
0
0
487
Nov ’23
Modal Activity Indicator - Is there a standard or best practice?
Every once in a while I find myself in need of a modal activity indicator that completely blocks the app (except for the activity indicator itself being tappable and therefore acting as a cancel button). I have always implemented my own view for that. The screenshot is showing my current implementation in SwiftUI. My question: why isn't there a standard iOS provided view for that scenario? Is there a best practice to that? Or am I missing something? Isn't it a common scenario having to block the app until an operation is completed like in the registration view of the attached screenshot, where the user has to wait for the network operation to finish?
0
1
756
May ’23