Usually when a crash is happening on iOS when the simulator or device is attached to Xcode I get a crash reason like the following example:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSJSONSerialization dataWithJSONObject:options:error:]: value parameter is nil'
When I look at the crashes of my published app in the Xcode Organizer using "Open in Project..." I see on which line of code the crash did happen. But is it also possible to get a reason for the crash like the above?
I'm asking this about Xcode Version 13.0.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have a UITableView based up. It is running fine on all iOS versions including 15.0. It is also running fine on all iPadOS versions up to 14.x. But only on iPadOS 15.0 it crashes with the following error message:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier TextCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
Is this a know issue? How can I debug it to figure out where the problem lies?
Note that I actually do register the NIB as follows in viewDidLoad:
static NSString *reuseIdentifierTextCell = @"TextCell";
[self.tableView registerNib:[UINib nibWithNibName:@"ChatTextCellCondensed" bundle:nil] forCellReuseIdentifier:reuseIdentifierTextCell];
It is crashing at this line in cellForRowAtIndexPath:
cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifierTextCell forIndexPath:indexPath];
Thanks!
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?
In the lastest iOS 15 if found the following to be the case regarding the combination of the global autocapitalization setting in the iOS Settings app and the autocapitalizationType property:
| Global setting | autocapitalizationType | Result (does it capitalize? |
|----------------|-------------------------|-----------------------------|
| on | Sentences | yes |
| on | not set | no |
| off | Sentences | no |
| off | not set | no |
What is the logic behind this?
On a side note, I also believe that in the second row of the above table, we had a 'yes' in earlier versions of iOS.
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?
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?
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?
I'm generating a date for a JSON file like so:
NSDateFormatter *dateFormatterIso8601 = [NSDateFormatter new];
[dateFormatterIso8601 setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZZZZ"];
[jsonDict setObject:[dateFormatterIso8601 stringFromDate:startDate] forKey:@"start"];
How is it possible that this is producing a JSON file with a date string of 2022-07-12T4:04:23GMT+02:00? There is a leading 0 missing for the hour.
Is this a known bug?
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?
Up until iOS 16.4 hyperlinks in PDF files that were shown using UIDocumentInteractionController have been working. One could just click on a link to get a "open link?" dialog.
In iOS 17 the links cannot be tapped any more. Is this a bug, is this a feature and can it be re-enabled again somehow?
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.
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:
In my UITableViewController when a sticky section header is replaced by the following header in succession, the cell below is revealed for a short time. This looks like a glitch to me. Is there a workaround to solve this?
The issue is best explained in video: https://youtube.com/shorts/JIEbFTTIDjA?feature=share
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.
I'm using the following code in my Info.plist to get my app to appear in the "Open in.." menu via the sharing button for PDF files:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>PDF</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.adobe.pdf</string>
</array>
</dict>
</array>
This is working fine.
But I cannot get the same effect for any type of image file. I was trying to add this according to some Stackoverflow posts:
<dict>
<key>CFBundleTypeName</key>
<string>public.jpeg</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.jpeg</string>
<string>public.jpg</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>public.png</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.png</string>
</array>
</dict>
However, it is not working for images.
Is this supported? Should it work?