My app start up has became horrid. It takes 1 minute to open SQLlite database for my rust core. Impossible to work...
I have Address Sanitizer, Thread Perf Checker and Thread Sanitizer disabled...
UIKit
RSS for tagConstruct and manage graphical, event-driven user interfaces for iOS or tvOS apps using UIKit.
Posts under UIKit tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
My app doesn't respond on iPhone Air iOS 26.1.
After startup, my app shows the main view with a tab bar controller containing 4 navigation controllers. However, when a second-level view controller is pushed onto any navigation controller, the UI freezes and becomes unresponsive. The iPhone simulator running iOS 26.1 exhibits the same problem.
The debug profile shows CPU usage at 100%.
However, other devices and simulators do not have this problem.
With iOS 26.1 we started seeing a bug that only appears on iPhone Air. This bug is visible with simulators too. I have tried so many different ways to fix the issue, but Instruments Profiler is pointing at UIKitCore.
We load a tab bar, when the user attempts to switch a tab, the app hangs and never recovers. It happens right as the animation of the Glass bubble is in progress.
I have tried a UIKit Tab bar, a SwiftUI Tab bar. I tore out AppDelegate and did a direct @main SwiftUI entry for my application. This issue appears with every tab bar instance I try.
I attempted to disable LiquidGlass by utilizing this flag UIDesignRequiresCompatibility in my plist, but the flag seems to be ignored by the system.
I am not sure what else to try. I have a trace file if that is helpful. What else can I upload?
Here is what the code looks like.
struct ContentView: View {
@State private var selectedTab = 2
var body: some View {
TabView(selection: $selectedTab) {
Text("Profile")
.tabItem {
Label("Me", systemImage: "person")
}
.tag(0)
Text("Training")
.tabItem {
Label("Training", systemImage: "calendar")
}
.tag(1)
Text("Home")
.tabItem {
Label("Home", systemImage: "house")
}
.tag(2)
Text("Goals")
.tabItem {
Label("Goals", systemImage: "target")
}
.tag(3)
Text("Coach")
.tabItem {
Label("Coach", systemImage: "person.2")
}
.tag(4)
}
}
}
#Preview {
ContentView()
}
and AppView entry point
import SwiftUI
@main
struct RunCoachApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Hello there,
I'm trying to implement feature which uses AirPlay with Apple TV. I want to disconnect from the device programmatically when something happens. Under something I mean a situation when a user wants to stop broadcasting (for example close the PiP window on his phone). I use this snippet:
try audioSession.setCategory(.playAndRecord, options: .defaultToSpeaker)
try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
It works fine sometimes but not always (it works on iOS 18 but it doesn't on iOS 17 or ). So I thought it's a bug and create a ticker to feedback assistant (FB21220013). The support told me write a post on the forum.
We have an iOS app running on macOS (not Mac Catalyst). The preferences are in a dedicated UIWindowScene. We don't want this scene to be restored, so when you start the app the preferences shouldn't be visible.
How can we prevent the UIWindowScene restoration?
Alternatively, if we can't prevent it, how can we ensure the main window scene is in front of the preferences window scene on app start?
Hello. I have an 12 year old app that still has some objective-c code in it. I have a place where i have a flip animation between 2 view controllers that looks like this:
[UIView transitionFromView:origView
toView:newViewController.view
duration:0.5
options:UIViewAnimationOptionTransitionFlipFromRight
completion:nil];
It has looked like this since 2012 at least.
In our production release, it works prior to 26.1, but in 26.1 and 26.2, the flip is off-center and looks weird. it's like both edges flip the same way. It's a little bit hard to explain.
If seen at least 2 other app store apps that i have installed behave this way too, from 26.1 and onwards.
Anyone else seen this? Is there anything that can be done about it?
Thankful for thoughts.
Is the Cancel button intentionally removed from UISearchBar (right side)?
Even when using searchController with navigationItem also.
showsCancelButton = true
doesn’t display the cancel button.
Also:
When tapping the clear ("x") button inside the search field, the search is getting canceled, and searchBarCancelButtonClicked(_:) is triggered (Generally it should only clear text, not cancel search).
If the search text is empty and I tap outside the search bar, the search is canceled.
Also when I have tableview in my controller(like recent searches) below search bar and if I try to tap when editing started, action is not triggered(verified in sample too). Just cancellation is happening.
In a split view controller, if the search is on the right side and I try to open the side panel, the search also gets canceled.
Are these behaviors intentional changes, beta issues, or are we missing something in implementation?
We have been using RoomPlan in our app for 2+ years. Through a combination of in-app and manual coaching on scanning best practices, most users are able to achieve high-quality scans on a consistent basis.
In recent weeks, however, we have observed an increase in reports of degraded scanning performance, even from veteran users who had not previously encountered issues. The RoomCaptureView overlay is jittery and crooked, and the resulting scan file has significant issues, even for simple, well-lit rectangular rooms.
It is difficult to troubleshoot these issues given the number of variables at play, and the overall volume of reports is still relatively low, but we'd appreciate any guidance on known issues or workarounds that could help unblock our users who are being affected by this. I noticed that this post includes an acknowledgement of FB14454922 and FB15035788. Our issues seem slightly different as the scans are simply inaccurate and jittery without failing outright. I haven't found any other threads on similar issues.
We are seeing a strange lifecycle issue on multiple MDM-managed iPads where
application(_:didFinishLaunchingWithOptions:) is not called after the device is idle overnight.
Even if we terminate the app manually via the app switcher, the next morning the system does not perform a cold launch. Instead, the app resumes directly in:
applicationDidBecomeActive(_:)
This causes all initialization logic that depends on didFinishLaunching to be completely skipped.
This behavior is consistent across four different supervised MDM devices.
Environment
Devices: iPads enrolled in MDM (supervised)
iOS version: 18.3
Xcode: 16.4
macOS: Sequoia 15.7.2
App type: Standard UIKit iOS app
App: Salux Audiometer (App Store app)
Expected Behavior
If the app was terminated manually using the app switcher, the next launch should:
Start a new process
Trigger application(_:didFinishLaunchingWithOptions:)
Follow the normal cold-start lifecycle
Actual Behavior
After leaving the iPad idle overnight (8–12 hours):
The next launch skips didFinishLaunching
The app resumes directly in applicationDidBecomeActive
No new process is started
App behaves as if it had been suspended, even though it was manually terminated
Logs (Relevant Extracts)
Day 1 — Normal cold launch
[12:06:44.152 PM] PROCESS_STARTED
[12:06:44.214 PM] DID_FINISH_LAUNCHING_START launchOptions=[]
[12:06:44.448 PM] DID_FINISH_LAUNCHING_END
We then used the app and terminated it via app switcher.
Day 2 — Unexpected resume without cold start
[12:57:49.328 PM] APP_DID_BECOME_ACTIVE
No PROCESS_STARTED
No didFinishLaunching
No cold-start logs
This means the OS resumed the app from a previous state that should not exist.
Reproducible Steps
Use an MDM-enrolled iPad.
Launch the app normally.
Terminate it manually via the multitasking app switcher.
Leave the device idle overnight (8–12 hours).
Launch the app the next morning.
Observe that:
didFinishLaunching does not fire
applicationDidBecomeActive fires directly
Questions for Apple Engineers / Community
Is this expected behavior on MDM-supervised devices in iOS 18?
Are there any known OS-level changes where terminated apps may be revived from disk/memory?
Could MDM restrictions or background restoration policies override app termination?
How can we ensure that our app always performs a clean initialization when launched after a long idle period?
Additional Information
We have full logs from four separate MDM iPads showing identical behavior.
Happy to share a minimal reproducible sample if required.
Hi team, I've been trying to extend the animation when we call the function setVisibleMapRect, we can use UIView.animate to lengthen the animation time, but one thing that I found not working is that when I extend the animation to 3, 5, or 10 seconds, and the changes is still ongoing and there's a gesture performed, the map will completely ignore the gesture. Causing the map to be having this kind of like "delayed" or "freeze" experience for the user. The map will immediately move to the final rect and ignores the user gesture.
I've been checking on this problem for a week now and I'm quite stuck. I've tried using CADisplayLink to manually animate the camera per system fresh rate, it works very well, I can stop the camera movement anytime there are touches, but it causes the resource CPU spikes.
Removing the animation layers recursively on sublayers and subviews also doesn't help. While storing the animation into a UIViewPropertyAnimator and use stopAnimation will always ignores user first interactions too while also animating the camera to the final position (which is not expected).
Hi. I have an iOS application with multiple input fields. I have to design an experience such that whenever the user presses enter key on a textfield, it should move focus to the next input field.
Similarly, consider a stack of 3 textfields, I want to cycle the focus as and when the user presses up/down arrow keys.
Other platforms like Android, have this feature out-of-the-box. I wanted to understand if iOS also supports this kind of behavior.
I know how to manually code such UX, but just wanted to confirm whether there is some inherent feature like on android which i can leverage?
Thanks.
UIViewController's modalInPopover is deprecated and might disappear in the near future. Is there any replacement?
UIViewController's presentViewController:animated:completion is not an equivalent because the modal style cannot be changed while the controller is already presented.
Our app has a UITabBar and the compactInlineLayoutAppearance has a custom font set. This worked fine on iOS 26.0 and 26.1.
[self.bottomTabBar.standardAppearance.compactInlineLayoutAppearance.normal setTitleTextAttributes: @{
NSFontAttributeName:[UIFont fontWithName:@"AvenirNext-DemiBold" size:18.0]
}];
But on iOS 26.2, the system ignores this custom font. How can I apply a custom font to a UITabBar on iOS 26.2?
Hello,
While integrating the Liquid Glass UI introduced in iOS 26 into my existing app, I encountered an unexpected issue.
My app uses a UITabBarController, where each tab contains a UINavigationController,
and the actual content resides in each UIViewController.
Typically, I perform navigation using navigationController?.pushViewController(...) and hide the TabBar by setting vc.hidesBottomBarWhenPushed = true when needed.
This structure worked perfectly fine prior to iOS 26, and I believe many apps use a similar approach.
However, after enabling Liquid Glass UI, a problem occurs.
Problem Description
From AViewController, I push BViewController with hidesBottomBarWhenPushed = true.
BViewController appears, and the TabBar is hidden as expected.
When performing a swipe-back gesture, as soon as AViewController becomes visible, the TabBar immediately reappears (likely due to A’s viewWillAppear).
The TabBar remains visible for a short moment even if the gesture is canceled — during that time, it is also interactable.
Before iOS 26, the TabBar appeared synchronized with AViewController and did not prematurely show during the swipe transition.
Tried using the new iOS 18 API:
tabBarController?.setTabBarHidden(false, animated: true)
It slightly improves the animation behavior, but the issue persists.
If hidesBottomBarWhenPushed is now deprecated or discouraged,
migrating entirely to setTabBarHidden would require significant refactoring, which is not practical for many existing apps.
Is this caused by a misuse of hidesBottomBarWhenPushed,
or could this be a regression or design change in iOS 26’s Liquid Glass UI?
All system colors are displayed incorrectly on the popover view.
Those are the same views present as a popover in light and dark mode.
And those are the same views present as modal.
And there is also a problem that when the popover is presented, switching to dark/light mode will not change the appearance. That affected all system apps.
The following screenshot is already in dark mode.
All those problem are occured on iOS 26 beta 3.
crash stack:
Crashed: com.apple.main-thread
0 libsystem_pthread.dylib 0x90c thread_chkstk_darwin + 60
1 libsystem_pthread.dylib 0x90c ___chkstk_darwin + 60
2 CoreAutoLayout 0x14c4 -[NSISEngine _flushPendingRemovals] + 56
3 CoreAutoLayout 0x2de08 -[NSISEngine _coreReplaceMarker:withMarkerPlusDelta:].cold.1 + 64
4 CoreAutoLayout 0x15d78 -[NSISEngine _coreReplaceMarker:withMarkerPlusDelta:] + 204
5 CoreAutoLayout 0x2ce38 -[NSISEngine constraintDidChangeSuchThatMarker:shouldBeReplacedByMarkerPlusDelta:] + 108
6 CoreAutoLayout 0x15f1c -[NSISEngine tryToChangeConstraintSuchThatMarker:isReplacedByMarkerPlusDelta:undoHandler:] + 100
7 CoreAutoLayout 0x2fdbc -[NSLayoutConstraint _tryToChangeContainerGeometryWithUndoHandler:] + 252
8 CoreAutoLayout 0x3020c -[NSLayoutConstraint _setSymbolicConstant:constant:symbolicConstantMultiplier:] + 452
9 CoreAutoLayout 0x30378 -[NSLayoutConstraint setConstant:] + 84
10 UIKitCore 0x51c3c __74-[UIView(UIConstraintBasedLayout) _autoresizingConstraints_frameDidChange]_block_invoke + 140
11 UIKitCore 0x1841174 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 112
12 UIKitCore 0x51b28 -[UIView(UIConstraintBasedLayout) _autoresizingConstraints_frameDidChange] + 452
13 UIKitCore 0x2c894 -[UIView _constraints_frameDidChange] + 100
14 UIKitCore 0x18fac08 -[UIView(Geometry) setFrame:] + 576
15 UIKitCore 0x96712c -[UITabBar setFrame:] + 128
16 UIKitCore 0x1666f4 -[_UITabBarControllerVisualStyle updateTabBarLayout] + 360
17 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400
18 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400
19 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400
20 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400
21 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400
22 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400
23 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400
24 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400
25 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400
26 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400
27 UIKitCore 0x16642c -[UITabBarController _prepareTabBar] + 128
28 UIKitCore 0x166a10 -[UITabBarController _layoutContainerView] + 376
29 UIKitCore 0x1677a8 -[UITabBarController __viewWillLayoutSubviews] + 28
30 UIKitCore 0x147078 -[UILayoutContainerView layoutSubviews] + 176
31 UIKit 0xb14a0 -[UILayoutContainerViewAccessibility layoutSubviews] + 60
for a more detail crash stack, can see attach file:
crash.txt
crash probabilistic happed after app enter background, and our app support landscape, when crash appear, the system method:
/*
This method is called when the view controller's view's size is changed by its parent (i.e. for the root view controller when its window rotates or is resized).
If you override this method, you should either call super to propagate the change to children or manually forward the change to children.
*/
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id <UIViewControllerTransitionCoordinator>)coordinator API_AVAILABLE(ios(8.0));
is called;
but for a normal not crash case, when enter background and rotate device, the viewWillTransitionToSize method is not called until app enter foreground;
Are there any suggestions that can help solve this problem, thank you.
问题场景:
Xcode26+iOS26系统,UICollectionView的reloadData不会触发调用UICollectionViewCell的layoutSubviews方法。
正常场景:
Xcode26+iOS18及以下系统,UICollectionView的reloadData能够触发调用UICollectionViewCell的layoutSubviews方法。
UITableView的reloadData,会正常调用UITableViewCell的layoutSubviews方法。
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
Hello!
I was doing some accessibility testing for my app and found out that when the user switches the text size, all of the data in the text fields is reset, which causes major disruption.
I've tried looking for documentation, but all I've found is information on how to dynamically scale the UI for different text sizes, which I've already implemented.
My guess is that every time Dynamic Type registers a change, it redraws my UI instead of just updating it.
How can I make sure the data is not reset when the text size changes?
We're seeing sporadic crashes on devices running iOS 18.1 - both beta and release builds (22B83). The stack trace is always identical, a snippet of it below. As you can tell from the trace, it's happening in places we embed SwiftUI into UIKit via UIHostingController.
Anyone else seeing this?
4 libobjc.A.dylib 0xbe2c _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 30
5 libobjc.A.dylib 0xb040 weak_register_no_lock + 396
6 libobjc.A.dylib 0xac50 objc_storeWeak + 472
7 libswiftCore.dylib 0x43ac34 swift_unknownObjectWeakAssign + 24
8 SwiftUI 0xeb74c8 _UIHostingView.base.getter + 160
9 SwiftUI 0x92124 _UIHostingView.layoutSubviews() + 112
10 SwiftUI 0x47860 @objc _UIHostingView.layoutSubviews() + 36