I'm not 100% sure that my issue was related to the assert warning.
However I can see a number of similarities in what some people have reported here.
For me, this issues caused a done button on my navigation bar to freeze.
My app while running in debug in the simulator with Xcode 14.3 / iOS 16.4 worked fine.
If I kill my app and run it without debug on the simulator the freeze would occur.
Also occurs on an real device.
This is what caused my issue..
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont fontWithName: APP_FONT size: [SharedCommon setAppFontSizeNavigationTitle]],
NSFontAttributeName, nil]];
I fixed it with this...
if (@available(iOS 15.0, *))
{
UIBarButtonItemAppearance *bbItemAppearance = [[UIBarButtonItemAppearance alloc] init];
bbItemAppearance.normal.titleTextAttributes =
[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont fontWithName: APP_FONT
size: [SharedCommon setAppFontSizeNavigationButton]],
NSFontAttributeName, nil];
UINavigationBarAppearance *navBarAppearance = [[UINavigationBarAppearance alloc] init];
// .... other appear here
navBarAppearance.buttonAppearance = bbItemAppearance;
[UINavigationBar appearance].standardAppearance = navBarAppearance;
[UINavigationBar appearance].scrollEdgeAppearance = navBarAppearance;
}
else
{
[[UIBarButtonItem appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont fontWithName: APP_FONT
size: [SharedCommon setAppFontSizeNavigationButton]],
NSFontAttributeName, nil] forState: UIControlStateNormal];
}
Hope this helps someone...
Jules.
Post
Replies
Boosts
Views
Activity
This works for me...
if !DataController.isUITesting {
_container.viewContext.undoManager = nil
_container.viewContext.shouldDeleteInaccessibleFaults = true
do {
try _container.viewContext.setQueryGenerationFrom(.current)
} catch {
fatalError("###\(#function): Failed to pin viewContext to the current generation:\(error)")
}
}