Construct and manage graphical, event-driven user interfaces for iOS or tvOS apps using UIKit.

UIKit Documentation

Posts under UIKit subtopic

Post

Replies

Boosts

Views

Activity

Persistent scroll stutter on iPhone 17 Pro Max, 18 Pro Max and 18 Pro (iOS 27.2), also on Apple Store demo units
Affected devices (all show the same problem): 1x iPhone 17 Pro Max 2x iPhone 18 Pro Max 1x iPhone 18 Pro Many demo iPhones at several Apple Stores Current iOS version: 27.2 Issue: Vertical scrolling inside apps frequently stutters and drops frames. It happens in many, many apps, including Apple's own App Store and Apple Store apps. During a normal flick-and-decelerate scroll, the content repeatedly freezes for one or more frames and then jumps forward. Because this reproduces on four of my own devices and on many Apple Store demo units, I believe it is a widespread, system-level issue, not a defect of a single device or my settings. Impact: I have been living with this for more than six months. I use my iPhone heavily every day, and the constant stutter has made using it genuinely distressing. Everything else about iPhone feels excellent, which makes this problem even harder to accept. Steps to reproduce: Open the App Store app (or almost any app with a scrolling list). Scroll with a normal flick and let it decelerate. Observe repeated hitches during the scroll. Measurements: I filmed the screen with a second iPhone at 4K 120 fps and measured content movement frame by frame: iPhone 18 Pro Max, third-party video feed: about 4 hitches per second of scrolling, about 4% of frames dropped, mostly single-frame drops. iPhone 18 Pro Max, third-party social app list: about 11 hitches per second, about 12% of frames dropped, at a regular rhythm every 6-8 frames. About a third of the stalls last 2-3 frames, and the content does not catch up afterwards. iPhone 17 Pro Max, third-party comment list: about 5 hitches per second, about 8% of frames dropped, including several full freezes of 50-75 ms. Expected: Smooth 120 Hz scrolling, as ProMotion is designed to deliver. Is Apple aware of this issue? I am happy to provide videos, frame-by-frame data, or sysdiagnose logs.
4
2
386
23h
State Restoration no longer works in a Mac Catalyst based app when run on macOS 27.x
As reported in FB25363417: A UIKit based app running on macOS 27.2 (or macOS 27.0.1) via Mac Catalyst no longer has functioning state restoration. Upon app restart, there is no NSUserActivity being provided to the scene in the UISceneDelegate method scene(_:willConnectTo:options:). This can be tested with Apple’s own sample app “Restoring your app’s state”. Just update the sample project with support for a Mac Catalyst build. Using Xcode 27.2 on a Mac with macOS 27.0 or 27.2, build and run the Mac Catalyst version of the app. The main screen appears with a list of products. Select any product so you see details of the product. Quit the app. Run the app again. Note that you are not returned to the previously selected product detail screen. Instead, you just see the main list of products. If you run the same app and perform the same steps on a Mac running macOS 26.x, then when the app is restarted, you correctly get returned to the previously selected product detail screen. The problem is being caused by no NSUserActivity being passed into the scene delegate on app startup. While running the app on a Mac with macOS 27.x, put a breakpoint on the initial guard statement in scene(_:willConnectTo:options:) and you will see there is no activity on app restart. This is impacting paid customers of my existing app since upgrading to macOS 27. They no longer get returned to the app’s previous state when restarting the app. It is expected that state restoration should work on macOS 27 just as well as it does under macOS 26 in an app built with Mac Catalyst.
1
0
163
2d
iPhone Duo vertical bar: system back button ignores custom back indicator image (UINavigationBarAppearance.setBackIndicatorImage)
On iPhone Duo (iOS 27.1), when UIKit moves a navigation controller's system back button into the vertical bar, the button always shows the system chevron. Every public API for customizing the back indicator image is ignored there, although the same configuration is honored in the horizontal (top) navigation bar. APIs tested (each one alone, on the second view controller of a UINavigationController stack, with no leftBarButtonItem): A. Nothing set (default). B. UINavigationBar.standardAppearance set to a UINavigationBarAppearance on which setBackIndicatorImage(_:transitionMaskImage:) was called. C. Same appearance assigned to all four UINavigationBar properties: standardAppearance, compactAppearance, scrollEdgeAppearance, compactScrollEdgeAppearance. D. Same appearance assigned to all four UINavigationItem properties of the pushed view controller: standardAppearance, compactAppearance, scrollEdgeAppearance, compactScrollEdgeAppearance. E. Legacy UINavigationBar.backIndicatorImage and UINavigationBar.backIndicatorTransitionMaskImage, with no appearance objects set. F. UINavigationBar.appearance() proxy: all four appearance properties, set before the navigation controller is created. G. UINavigationItem.backBarButtonItem of the previous view controller set to UIBarButtonItem(image:style:target:action:). H. Control: UINavigationItem.leftBarButtonItem set to UIBarButtonItem(image:style:target:action:) with the same image (axisBehavior left at .automatic). The marker image is UIImage(systemName: "arrow.uturn.backward"), so it cannot be mistaken for the system chevron. Results: Top navigation bar (iPhone 17 Pro iOS 27.0, and iPhone Duo open with portrait UI): B, C, D, E and F show the custom image. G shows the chevron followed by the image. Vertical bar (iPhone Duo closed; iPhone Duo open with landscape UI; also inside a UITabBarController with the tab bar hidden or visible): A through G all show the system chevron. Only H shows the custom image. At viewDidAppear, the app confirms that the configuration is in place: navigationBar.standardAppearance.backIndicatorImage is the marker image (B, C), navigationItem.standardAppearance is non-nil (D), and traitCollection.verticalBarEdge is .trailing. This contradicts the guidance given by an Apple Technology Evangelist in https://developer.apple.com/forums/thread/847875: "If you are only replacing the icon on the back button, you could use set the backIndicatorImage and maintain default system behavior. This would be the recommended approach." As things stand, the only way to show a custom back icon in the vertical bar is to replace the system back button with a leading item. That loses the system behavior that comes with it: UINavigationController.interactivePopGestureRecognizer, interactiveContentPopGestureRecognizer and the back-history menu.
Topic: UI Frameworks SubTopic: UIKit Tags:
2
3
549
2d
didUpdateEffectiveGeometry reports outer display frame when app is send to background while using the inner display.
On iPhone Duo, when the app goes into background while being used on the inner display, windowScene(_:didUpdateEffectiveGeometry:) is called with a frame matching the geometry of the outer display.  When the app returns to the foreground, the callback fires again with the inner display geometry. We reload our layouts based on this callback so the transient frame cause a visible relayout when returning to the app. This also reproduces when building with Xcode 27.3 beta and on OS version 27.2.0. Snippet: func windowScene(_ windowScene: UIWindowScene, didUpdateEffectiveGeometry previousEffectiveGeometry: UIWindowScene.Geometry) { log("didUpdateEffectiveGeometry", windowScene) } func sceneDidEnterBackground(_ scene: UIScene) { log("sceneDidEnterBackground", scene) } func sceneWillEnterForeground(_ scene: UIScene) { log("sceneWillEnterForeground", scene) } private func log(_ event: String, _ scene: UIScene) { guard let windowScene = scene as? UIWindowScene else { return } let state = windowScene.activationState == .background ? "background" : "foreground" let size = windowScene.effectiveGeometry.coordinateSpace.bounds.size print("\(event) | state: \(state) | size: \(Int(size.width)) x \(Int(size.height))") }Logs: sceneDidEnterBackground | state: background | size: 951 x 669 didUpdateEffectiveGeometry | state: background | size: 466 x 678 <- outer display size, device NOT folded didUpdateEffectiveGeometry | state: background | size: 951 x 669 sceneWillEnterForeground | state: background | size: 951 x 669Is this the expected behaviour, or a known issue? If it’s expected, what’s the recommended way to distinguish the effective geometry change?
Topic: UI Frameworks SubTopic: UIKit
0
0
30
2d
UITableView row reordering no longer works under macOS 27 with Mac Catalyst
Under macOS 27 using Mac Catalyst for a UIKit-based app, If you present a view controller with a table view as a form sheet or page sheet, row reordering fails to function. You can drag a row as expected but the blue movement bar never appears and if you drop the row it simply returns to its original location. The exact same view controller presented as a popover works just fine. The exact same view controller not presented as a modal (such as the app's root controller) works just fine. This is a serious bug affecting existing applications and being reported by paying customers. This has been reported as FB25038883 which includes a simple sample app demonstrating the issue.
4
1
571
2d
iOS 27: FBSScene crashes in objc_release_x26 after a scene settings update
Feedback Assistant: FB25454822 On iOS 27, our app (com.netshort.abroad) crashes inside FrontBoardServices while releasing an object saved across a synchronous scene-update callout. The stack has only system frames. A build shipped in September 2025 (1.8.3) hits the same crash as soon as the device is updated to iOS 27, so this is not a recent app change. OS: iOS 27.0.0 (24A435), iOS 27.0.1 (24A446) On build 2.3.4: 1264 events, 1216 users 0 libobjc.A.dylib objc_release_x26 + 8 1 FrontBoardServices -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 780 2 FrontBoardServices _queue_updateScene…_block_invoke_2.cold.1 + 352 3 FrontBoardServices _queue_updateScene…_block_invoke_2 + 96 4 FrontBoardServices _calloutQueue_executeCalloutFromSource:withBlock: + 168 On 27.0.0 these frames show as <redacted> in Crashlytics. FrontBoardServices 0x19a88 is this method at 0x1977c plus 780, matching symbolicated 27.0.1 reports. In the 27.0.1 FrontBoardServices binary, +776 is objc_release(x26) and +780 is the return address. x26 is transitionContext.actions. The callout into UIKit is the bl at +0x2ac. The crash happens after that callout returns. 34 Apple crash reports with register state show the same pattern: the low byte of saved x26 is 0x01. 20 reports: objc_release_x26 + 8, x26 = 0x1 14 reports: objc_release_x26 + 16, x26 ends in 0x01 (for example 0x13c373a01) A nil actions value 0x0 becomes 0x1. A real pointer only has its low byte changed, so the isa read is off by one. In the +16 reports, x16 (0x8001000001fa8d89) is that isa shifted by one byte. This looks like a one-byte store of YES into the stack slot where x26 was saved across the callout. There is no single user action that reproduces it. It happens when the system delivers a scene settings update. The frame that wrote the byte is already gone, because the crash is recorded after the callout returns. Has anyone else seen this on iOS 27? I attached three .crash files with full register state to FB25454822.
Topic: UI Frameworks SubTopic: UIKit
1
1
401
3d
A bug in iOS 27.3 beta 2 where the UIHingeInteraction value is received even though it is not an iPhone Duo device.
The device currently showing the symptom is iPhone SE3, iOS 27.3 Beta 2 version installed. (Same symptom exists in Beta 1 as well.) On screen A When switching to another ViewController (screen B) with pushViewController of UINavigationController Declare UIHingeInteraction on screen A and self.view.addInteraction(hInteraction) I added it like the code above. Hinge value comes in. In the sample code below update.hinge value is not nil The update.hinge!.angle value is also displayed as 0. let hInteraction:UIHingeInteraction = UIHingeInteraction { interaction, update in if update.hinge != nil { let hingeAngle:CGFloat = update.hinge!.angle..... }} In apps installed on other iPhone 17 devices (with iOS 27.2 installed), the value does not appear there. A quick fix is ​​needed. I have also submitted a report via Apple Feedback; please ensure this is addressed in the upcoming Beta 3 release. *** Plus *** The horizontalSizeClass and verticalSizeClass properties are returning "Regular" values, similar to how they behave on the iPhone Duo's internal display. Please fix the above issue as well.
0
0
117
3d
iOS 27b3 SDK: iOS App on Mac crashes on UISearchBar focus
Our app crashes when compiled with the iOS 27 beta 3 SDK and run as an iOS app on Mac, on both macOS 26 and macOS 27, as soon as a UISearchBar receives focus. The crash is due to this exception: *** Assertion failure in BOOL _screenBasedFocusUnsupported(void)(), UIScreen.m:3.725 Accessing the focus system through UIScreen is no longer supported. ( 0 CoreFoundation 0x000000018bea31c0 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000018b91e91c objc_exception_throw + 88 2 Foundation 0x000000018e092644 -[NSMutableDictionary(NSMutableDictionary) initWithContentsOfFile:] + 0 3 UIKitCore 0x00000001c5dae8ec _screenBasedFocusUnsupported + 272 4 UIKitCore 0x00000001c5dae960 -[UIScreen _preferredFocusedWindow] + 24 5 UIKitCore 0x00000001c4ea3a60 -[UIScreen _mainSceneReferenceBounds] + 200 6 UIKitCore 0x00000001c4ea3914 -[UIScreen _mainSceneBoundsForInterfaceOrientation:] + 40 7 UIKitCore 0x00000001c5708134 +[UINavigationBar defaultSizeForOrientation:] + 76 8 UIKitCore 0x00000001c6222c88 -[_UISearchPresentationController _layoutPresentationWithSize:transitionCoordinator:] + 704 9 UIKitCore 0x00000001c622296c -[_UISearchPresentationController containerViewWillLayoutSubviews] + 84 10 UIKitCore 0x00000001c549304c block_destroy_helper.13 + 25112 11 UIKitCore 0x00000001c549344c block_destroy_helper.13 + 26136 12 UIKitCore 0x00000001c4ea26a8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1648 13 QuartzCore 0x0000000196103dbc _ZN2CA5Layer15perform_update_EPS0_P7CALayerjNS_17LayerUpdateReasonEPNS_11TransactionE + 460 14 QuartzCore 0x000000019610390c _ZN2CA5Layer17update_if_needed_EPNS_11TransactionENS_17LayerUpdateReasonE + 692 15 QuartzCore 0x0000000196035d2c _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 608 16 QuartzCore 0x0000000195e69520 _ZN2CA11Transaction6commitEv + 652 17 AppKit 0x0000000190fe116c __37+[NSDisplayCycle currentDisplayCycle]_block_invoke.7 + 44 18 CoreFoundation 0x000000018be34ad0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28 19 CoreFoundation 0x000000018be34a10 __CFRunLoopDoBlocks + 396 20 CoreFoundation 0x000000018be33e54 __CFRunLoopRun + 2356 21 CoreFoundation 0x000000018bf06234 _CFRunLoopRunSpecificWithOptions + 532 22 HIToolbox 0x0000000198c1f560 RunCurrentEventLoopInMode + 320 23 HIToolbox 0x0000000198c228bc ReceiveNextEventCommon + 488 24 HIToolbox 0x0000000198dac14c _BlockUntilNextEventMatchingListInMode + 48 25 AppKit 0x00000001909163d0 _DPSBlockUntilNextEventMatchingListInMode + 228 26 AppKit 0x000000019026a084 _DPSNextEvent + 576 27 AppKit 0x0000000190dff96c -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688 28 AppKit 0x0000000190dff678 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72 29 AppKit 0x000000019025d13c -[NSApplication run] + 368 30 AppKit 0x00000001902357b0 NSApplicationMain + 880 31 AppKit 0x000000019047c958 +[NSWindow _savedFrameFromString:] + 0 32 UIKitMacHelper 0x00000001aa2651bc UINSApplicationMain + 972 33 UIKitCore 0x00000001c4e1aed4 UIApplicationMain + 144 34 UIKitCore 0x00000001c548bda0 block_destroy_helper.31 + 8880 35 DigitalConcertHall.debug.dylib 0x0000000106e41bd8 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 128 36 DigitalConcertHall.debug.dylib 0x0000000106e41b4c $s18DigitalConcertHall11AppDelegateC5$mainyyFZ + 32 37 DigitalConcertHall.debug.dylib 0x0000000106e4afc0 __debug_main_executable_dylib_entry_point + 28 38 dyld 0x000000018b9ac4e4 start + 6992 ) I could not test with the iOS 27 beta 4 SDK due to this blocking issue: https://developer.apple.com/forums/thread/839012 However, when I tried to set up a simple sample project, I could not reproduce the issue. Does anybody know what might be causing this? I filed feedback FB24201508
8
2
2.1k
5d
UIWindowScene sizeRestrictions minimumSize not working on iPadOS
Hello, following Apple docs and guidance from WWDC I'm trying to set a minimum size for my scene, for example I want it to minimally be 3/4 the width and height of the device. I've removed the UIRequiresFullScreen Info.plist property. The app does run in windowed mode and does have a resizing handle. I've implemented this UISceneDelegate: var window: UIWindow? var cameraWindow: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { window = UIWindow(windowScene: scene as! UIWindowScene) // setup root view controller let rootViewController: MainViewController = MainViewController(nibName: "Main", bundle: nil) let navController: NavigationController = NavigationController(rootViewController: rootViewController) navController.modalPresentationStyle = .fullScreen // set reasonable minimum sizes for WindowScene if let windowScene: UIWindowScene = scene as? UIWindowScene { if #available(iOS 16.0, *) { let windowSize: CGSize = windowScene.coordinateSpace.bounds.size windowScene.sizeRestrictions?.minimumSize.width = windowSize.width * 0.75 windowScene.sizeRestrictions?.minimumSize.height = windowSize.height * 0.75 } } window?.rootViewController = navController window?.makeKeyAndVisible() } } And proven via debugger that this code is being executed. I have the following observations: After setting these minimumSize properties I see the width and height both contain 0 afterwards, as if the property settings are discarding the value. I've even used hard-coded values instead of reading the coordinateSpace.bounds, to no avail. The scene is allowing resizing well below these minimums, about 1/3 the width and 1/2 the height. Anyone else observed this and have suggestions?
Topic: UI Frameworks SubTopic: UIKit
1
1
372
5d
How to disable a custom detent in a UISheetPresentationController
If you are creating a UISheetPresentationController with custom detents and you have a need to disable one of the detents, then you can do so by returning a special value from the detent's resolver. This is addressed in the Objective-C documentation for customDetentWithIdentifier:resolver:. You return the special value UISheetPresentationControllerDetentInactive. For example: UISheetPresentationControllerDetent *customDetent = [UISheetPresentationControllerDetent customDetentWithIdentifier:@"customId" resolver:^CGFloat(id<UISheetPresentationControllerDetentResolutionContext> _Nonnull context) { if (some condition) { return UISheetPresentationControllerDetentInactive; } else { return context.maximumDetentValue / 3.0; } }];However, if you wish to do this in Swift, there is no corresponding API for UISheetPresentationControllerDetentInactive. It turns out that you can just use .greatestFiniteMagnitude instead. For example: let customDetent = UISheetPresentationController.Detent.custom(identifier: .init("customId")) { context in if some condition { return .greatestFiniteMagnitude //UISheetPresentationControllerDetentInactive } else { return context.maximumDetentValue / 3.0 } }It might be tempting to add the following: extension UISheetPresentationController.Detent { static let Inactive = CGFloat.greatestFiniteMagnitude }but this could cause a conflict if Apple adds a similar API in the future. This oversight in the Swift API has been reported as FB25567661.
1
0
126
1w
UIKIt, iOS 27, UIDocumentPickerViewController(forExporting: [fileURL])
My App saves files using the UIDocumentPickerViewController. This works from iOS 17 to 26. Usually, you have a file with a given name in your sandbox, which you can then export via the pickerVC. In the pickerVC you change the name. In iOS 27 the file name is greyed-out and you can't change it here. The file can be exported only with the pre-given name. Is this a new behaviour or bug in iOS 27?
Topic: UI Frameworks SubTopic: UIKit
2
0
170
1w
Adapting a large UIKit/Objective-C document viewer controller for iPhone Duo on the iOS 27.1 SDK
We ship a mature document viewer (PDF) written mostly in Objective-C with UIKit. It runs on iPhone and iPad and supports multiple scenes. We're planning support for iPhone Duo and would like advice on the right architectural approach before we start. Current structure (simplified) One root viewer view controller (a UIViewController subclass, large and long-lived) owns the document view, search, bookmarks, text-to-speech, presentation mode and similar features. Most of these live in categories and helper modules. Chrome is swapped by size class. A factory picks one of two "toolbars controller" classes based on the trait collection: one for compact, one for regular. The regular one also hosts a tab strip and a sidebar built on the system sidebar UI. When the class it would pick changes, traitCollectionDidChange: tears down the current chrome controller, builds the other one, re-parents the document view into the new container, and then restores tool and presentation state. We skip this while the app isn't active, because UIKit sends trait changes during backgrounding. Geometry changes go through viewWillTransitionToSize:withTransitionCoordinator:, which forwards to the chrome controller, the document view and a zoomed handwriting helper. When the transition completes we recompute content insets and re-render the output for an external display. The document view is a custom scroll-based view (not PDFKit). It has display modes for continuous, single page, two-page spread and two-page spread with a cover page. It calculates its own insets from safe areas and whatever chrome is visible. We still use traitCollectionDidChange: and haven't moved to registerForTraitChanges:. Questions Posture changes and size-class flips. When the device folds or unfolds, should we expect a normal viewWillTransitionToSize: plus a trait change (compact ↔ regular) that our existing swap handles? Or is there a posture/display-configuration signal we should observe instead? Swapping the whole chrome hierarchy in the middle of a fold animation seems costly. Is there a recommended way to defer or coordinate that with the transition coordinator? Hinge or seam area. Is the fold region exposed through safe-area insets, layout guides or a new API? A custom scroll view that lays out two-page spreads needs to keep content out of that region, or line the spread up with it. What's the recommended way to get this geometry from Objective-C? Two-page spread tied to posture. Showing a two-page spread automatically when the device is unfolded (like an open book) seems natural. Does Apple recommend deciding this from traits/posture or from bounds, and is there a trait we can override per view controller? Trait registration. For this form factor, is it effectively required to move from traitCollectionDidChange: to registerForTraitChanges: (for example to get notified about new traits), or will the legacy callback still fire reliably? Scenes and external displays. Does iPhone Duo change anything about scene activation, window geometry or UIScreen handling that a multi-scene app with external-display output should plan for? Incremental adoption. Can we adopt this step by step in Objective-C, or do some of the APIs only exist in Swift and push us toward Swift wrappers? Any pointers to WWDC sessions, sample code or documentation for adapting existing UIKit apps would be very helpful. Thanks!
Topic: UI Frameworks SubTopic: UIKit
4
1
380
1w
UISceneDelegate.sceneWillResignActive and sceneDidEnterBackground not called on iOS 27
In our UIKit app built with Xcode 27.2 / iOS 27 SDK, the foreground-to-background UISceneDelegate methods are not called when the app enters background. The matching UIApplication notifications are still posted. Environment: Device: iPhone 13 OS: iOS 27.2 Xcode: 27.2 (27B52) UIApplicationSupportsMultipleScenes: false SceneDelegate configured in Info.plist Observed: Launch: scene:willConnectToSession:options: sceneWillEnterForeground: sceneDidBecomeActive: Press Home / switch app / lock screen: (sceneWillResignActive: NOT called) (sceneDidEnterBackground: NOT called) Return to app: sceneWillEnterForeground: sceneDidBecomeActive: Evidence from file logging: [2026-11-12 11:28:05.502] sceneWillEnterForeground [2026-11-12 11:28:05.729] sceneDidBecomeActive [2026-11-12 13:25:45.077] sceneWillEnterForeground [2026-11-12 13:25:45.517] sceneDidBecomeActive No sceneWillResignActive or sceneDidEnterBackground entries. However, UIApplicationWillResignActiveNotification and UIApplicationDidEnterBackgroundNotification are delivered correctly. Expected: sceneWillResignActive: and sceneDidEnterBackground: should be called when leaving foreground. Workaround: We currently fall back to UIApplication notifications.
Topic: UI Frameworks SubTopic: UIKit
1
0
73
1w
iPadOS 27.0.1: iPhone-only apps crash when displaying the Japanese Kana keyboard on iPad
We are seeing a crash when attempting to display the Japanese Kana keyboard (日本語-かな) in our iPhone-only app running on an iPad with iPadOS 27.0.1. The keyboard displays successfully in our app on iPadOS 26 and iPadOS 27.0. We also reproduced a similar crash in other iPhone-only apps downloaded from the App Store on the affected iPad. We have not yet confirmed whether those apps crash with the same exception. Our app logs the following exception: *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM insertObject:atIndex:]: index 15 beyond bounds [0 .. 2]' *** First throw call stack: ( 0x19fab7190 0x19f834380 0x19fa45734 0x1aee9f5bc 0x1aee3dc14 0x1aee3cb30 0x1aee3c4d4 0x1aee3ab0c 0x1a433798c 0x1a44a4120 0x1a449bd5c 0x1a42148c8 0x1a42143fc 0x1a4239d7c 0x1a421203c 0x1a3fc1338 0x1a3d12e0c 0x1a3d11ed0 0x1a52784ec 0x1a3d11abc 0x1a4115238 0x1a3d436d4 0x1a3d43a80 0x1a44eea14 0x1aabb8ef8 0x1a517161c 0x1a5152450 0x1a5153388 0x1a41f20c4 0x1a49e3fec 0x1a426598c 0x1a42657fc 0x1a4265580 0x1a3d62b30 0x1a3d62984 0x1a95c4dac 0x1a994fb68 0x1a95c5514 0x1a95c287c 0x1a95d2608 0x1a3d6841c 0x1a3d6a298 0x1a4263874 0x1a3d60bdc 0x1a3ce8d78 0x1a3ce7b88 0x1a3ce7928 0x2d1482bc0 0x19fa78c20 0x19fa78b94 0x19fa5a268 0x19fa59384 0x19fa5a7f4 0x249e6ff24 0x1a3d381cc 0x1a9d27404 0x1a9d20b50 0x1a9d20a10 0x109042dc4 0x109042e04 0x19f8ab5b8 ) libc++abi: terminating due to uncaught exception of type NSException Steps to reproduce: Enable the Japanese – Kana keyboard in the iPad’s keyboard settings. Open an affected iPhone-only app on an iPad running iPadOS 27.0.1. Tap a text input field and attempt to display the Japanese Kana keyboard. The app crashes. We suspect this may be a regression involving iPhone compatibility mode on iPad and the Japanese Kana keyboard, but we have not yet identified the failing component in a symbolicated stack trace. We have submitted a report through Feedback Assistant: FB24985530. Has anyone else encountered this behavior? Are there any known workarounds we can apply in the app while this is being investigated?
Topic: UI Frameworks SubTopic: UIKit Tags:
8
7
2.0k
1w
iPhone Duo: Keep app on inner display while hinge is open (like Clock)?
Hi! I'm building a night-light app for iPhone Duo. When the device is partly open in tent mode, the lamp starts on the inner display. As soon as I set the phone down on a table, the system moves my window to the outer display, even though the hinge stays open. Apple's Clock app stays on the inner display in the same pose, so it seems possible at the system level. Steps Open iPhone Duo to ~80° (tent). Launch the app on the inner display. Set the device down on a table. Observed (logged from the app) UIHinge.status stays .partiallyOpen (~80°), not .closed. UIDevice.orientation goes portraitUpsideDown → faceDown → landscapeRight. UIScreen.didDisconnectNotification fires and UIScreen.screens drops the inner screen. The window moves to the outer screen (466×678). What I've tried Restricting UISupportedInterfaceOrientations to portrait only Turning on Rotation Lock Reading UIHingeInteraction (read-only, no effect on display routing) Looking at UISceneAccessory.cameraCapture, which only applies with an active capture session and a fully open device Question Is there a supported way for a scene to prefer or stay on the inner display while the hinge isn't closed? If not, I'll file a Feedback Assistant request. iPhone Duo · iOS 27.2 · Xcode 27.2
1
0
71
1w
Request to remove horizontal blank space for keyboard extensions on iPhone Duo.
I have a custom iOS keyboard extension app. On iPhone Duo, the system forces keyboard extensions inside a container that is narrower than the phone's screen, specifically by adding extra 7 points on the leading and trailing edge in portrait. This creates both a visual and functional blank space on both sides of the keyboard. My keyboard relies on side swipes, which are much more annoying to perform when the keyboard does not occupy full width of the screen. All other devices iPhones before the Duo propely stretch the keyboard to full width, so this is a new issue. Please, reconsider this decision. I believe a better way to handle this is by setting the safe area layout, instead of limiting the container's width itself. I don't see any benefit to protecting these 7 points on each side. Keyboards that don't care will still stay within the limit by respecting the horizontal safe area, while others would get the benefit of better customization.
0
0
112
1w
Persistent scroll stutter on iPhone 17 Pro Max, 18 Pro Max and 18 Pro (iOS 27.2), also on Apple Store demo units
Affected devices (all show the same problem): 1x iPhone 17 Pro Max 2x iPhone 18 Pro Max 1x iPhone 18 Pro Many demo iPhones at several Apple Stores Current iOS version: 27.2 Issue: Vertical scrolling inside apps frequently stutters and drops frames. It happens in many, many apps, including Apple's own App Store and Apple Store apps. During a normal flick-and-decelerate scroll, the content repeatedly freezes for one or more frames and then jumps forward. Because this reproduces on four of my own devices and on many Apple Store demo units, I believe it is a widespread, system-level issue, not a defect of a single device or my settings. Impact: I have been living with this for more than six months. I use my iPhone heavily every day, and the constant stutter has made using it genuinely distressing. Everything else about iPhone feels excellent, which makes this problem even harder to accept. Steps to reproduce: Open the App Store app (or almost any app with a scrolling list). Scroll with a normal flick and let it decelerate. Observe repeated hitches during the scroll. Measurements: I filmed the screen with a second iPhone at 4K 120 fps and measured content movement frame by frame: iPhone 18 Pro Max, third-party video feed: about 4 hitches per second of scrolling, about 4% of frames dropped, mostly single-frame drops. iPhone 18 Pro Max, third-party social app list: about 11 hitches per second, about 12% of frames dropped, at a regular rhythm every 6-8 frames. About a third of the stalls last 2-3 frames, and the content does not catch up afterwards. iPhone 17 Pro Max, third-party comment list: about 5 hitches per second, about 8% of frames dropped, including several full freezes of 50-75 ms. Expected: Smooth 120 Hz scrolling, as ProMotion is designed to deliver. Is Apple aware of this issue? I am happy to provide videos, frame-by-frame data, or sysdiagnose logs.
Replies
4
Boosts
2
Views
386
Activity
23h
State Restoration no longer works in a Mac Catalyst based app when run on macOS 27.x
As reported in FB25363417: A UIKit based app running on macOS 27.2 (or macOS 27.0.1) via Mac Catalyst no longer has functioning state restoration. Upon app restart, there is no NSUserActivity being provided to the scene in the UISceneDelegate method scene(_:willConnectTo:options:). This can be tested with Apple’s own sample app “Restoring your app’s state”. Just update the sample project with support for a Mac Catalyst build. Using Xcode 27.2 on a Mac with macOS 27.0 or 27.2, build and run the Mac Catalyst version of the app. The main screen appears with a list of products. Select any product so you see details of the product. Quit the app. Run the app again. Note that you are not returned to the previously selected product detail screen. Instead, you just see the main list of products. If you run the same app and perform the same steps on a Mac running macOS 26.x, then when the app is restarted, you correctly get returned to the previously selected product detail screen. The problem is being caused by no NSUserActivity being passed into the scene delegate on app startup. While running the app on a Mac with macOS 27.x, put a breakpoint on the initial guard statement in scene(_:willConnectTo:options:) and you will see there is no activity on app restart. This is impacting paid customers of my existing app since upgrading to macOS 27. They no longer get returned to the app’s previous state when restarting the app. It is expected that state restoration should work on macOS 27 just as well as it does under macOS 26 in an app built with Mac Catalyst.
Replies
1
Boosts
0
Views
163
Activity
2d
iPhone Duo vertical bar: system back button ignores custom back indicator image (UINavigationBarAppearance.setBackIndicatorImage)
On iPhone Duo (iOS 27.1), when UIKit moves a navigation controller's system back button into the vertical bar, the button always shows the system chevron. Every public API for customizing the back indicator image is ignored there, although the same configuration is honored in the horizontal (top) navigation bar. APIs tested (each one alone, on the second view controller of a UINavigationController stack, with no leftBarButtonItem): A. Nothing set (default). B. UINavigationBar.standardAppearance set to a UINavigationBarAppearance on which setBackIndicatorImage(_:transitionMaskImage:) was called. C. Same appearance assigned to all four UINavigationBar properties: standardAppearance, compactAppearance, scrollEdgeAppearance, compactScrollEdgeAppearance. D. Same appearance assigned to all four UINavigationItem properties of the pushed view controller: standardAppearance, compactAppearance, scrollEdgeAppearance, compactScrollEdgeAppearance. E. Legacy UINavigationBar.backIndicatorImage and UINavigationBar.backIndicatorTransitionMaskImage, with no appearance objects set. F. UINavigationBar.appearance() proxy: all four appearance properties, set before the navigation controller is created. G. UINavigationItem.backBarButtonItem of the previous view controller set to UIBarButtonItem(image:style:target:action:). H. Control: UINavigationItem.leftBarButtonItem set to UIBarButtonItem(image:style:target:action:) with the same image (axisBehavior left at .automatic). The marker image is UIImage(systemName: "arrow.uturn.backward"), so it cannot be mistaken for the system chevron. Results: Top navigation bar (iPhone 17 Pro iOS 27.0, and iPhone Duo open with portrait UI): B, C, D, E and F show the custom image. G shows the chevron followed by the image. Vertical bar (iPhone Duo closed; iPhone Duo open with landscape UI; also inside a UITabBarController with the tab bar hidden or visible): A through G all show the system chevron. Only H shows the custom image. At viewDidAppear, the app confirms that the configuration is in place: navigationBar.standardAppearance.backIndicatorImage is the marker image (B, C), navigationItem.standardAppearance is non-nil (D), and traitCollection.verticalBarEdge is .trailing. This contradicts the guidance given by an Apple Technology Evangelist in https://developer.apple.com/forums/thread/847875: "If you are only replacing the icon on the back button, you could use set the backIndicatorImage and maintain default system behavior. This would be the recommended approach." As things stand, the only way to show a custom back icon in the vertical bar is to replace the system back button with a leading item. That loses the system behavior that comes with it: UINavigationController.interactivePopGestureRecognizer, interactiveContentPopGestureRecognizer and the back-history menu.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
2
Boosts
3
Views
549
Activity
2d
didUpdateEffectiveGeometry reports outer display frame when app is send to background while using the inner display.
On iPhone Duo, when the app goes into background while being used on the inner display, windowScene(_:didUpdateEffectiveGeometry:) is called with a frame matching the geometry of the outer display.  When the app returns to the foreground, the callback fires again with the inner display geometry. We reload our layouts based on this callback so the transient frame cause a visible relayout when returning to the app. This also reproduces when building with Xcode 27.3 beta and on OS version 27.2.0. Snippet: func windowScene(_ windowScene: UIWindowScene, didUpdateEffectiveGeometry previousEffectiveGeometry: UIWindowScene.Geometry) { log("didUpdateEffectiveGeometry", windowScene) } func sceneDidEnterBackground(_ scene: UIScene) { log("sceneDidEnterBackground", scene) } func sceneWillEnterForeground(_ scene: UIScene) { log("sceneWillEnterForeground", scene) } private func log(_ event: String, _ scene: UIScene) { guard let windowScene = scene as? UIWindowScene else { return } let state = windowScene.activationState == .background ? "background" : "foreground" let size = windowScene.effectiveGeometry.coordinateSpace.bounds.size print("\(event) | state: \(state) | size: \(Int(size.width)) x \(Int(size.height))") }Logs: sceneDidEnterBackground | state: background | size: 951 x 669 didUpdateEffectiveGeometry | state: background | size: 466 x 678 <- outer display size, device NOT folded didUpdateEffectiveGeometry | state: background | size: 951 x 669 sceneWillEnterForeground | state: background | size: 951 x 669Is this the expected behaviour, or a known issue? If it’s expected, what’s the recommended way to distinguish the effective geometry change?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
30
Activity
2d
UITableView row reordering no longer works under macOS 27 with Mac Catalyst
Under macOS 27 using Mac Catalyst for a UIKit-based app, If you present a view controller with a table view as a form sheet or page sheet, row reordering fails to function. You can drag a row as expected but the blue movement bar never appears and if you drop the row it simply returns to its original location. The exact same view controller presented as a popover works just fine. The exact same view controller not presented as a modal (such as the app's root controller) works just fine. This is a serious bug affecting existing applications and being reported by paying customers. This has been reported as FB25038883 which includes a simple sample app demonstrating the issue.
Replies
4
Boosts
1
Views
571
Activity
2d
iOS 27: FBSScene crashes in objc_release_x26 after a scene settings update
Feedback Assistant: FB25454822 On iOS 27, our app (com.netshort.abroad) crashes inside FrontBoardServices while releasing an object saved across a synchronous scene-update callout. The stack has only system frames. A build shipped in September 2025 (1.8.3) hits the same crash as soon as the device is updated to iOS 27, so this is not a recent app change. OS: iOS 27.0.0 (24A435), iOS 27.0.1 (24A446) On build 2.3.4: 1264 events, 1216 users 0 libobjc.A.dylib objc_release_x26 + 8 1 FrontBoardServices -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 780 2 FrontBoardServices _queue_updateScene…_block_invoke_2.cold.1 + 352 3 FrontBoardServices _queue_updateScene…_block_invoke_2 + 96 4 FrontBoardServices _calloutQueue_executeCalloutFromSource:withBlock: + 168 On 27.0.0 these frames show as <redacted> in Crashlytics. FrontBoardServices 0x19a88 is this method at 0x1977c plus 780, matching symbolicated 27.0.1 reports. In the 27.0.1 FrontBoardServices binary, +776 is objc_release(x26) and +780 is the return address. x26 is transitionContext.actions. The callout into UIKit is the bl at +0x2ac. The crash happens after that callout returns. 34 Apple crash reports with register state show the same pattern: the low byte of saved x26 is 0x01. 20 reports: objc_release_x26 + 8, x26 = 0x1 14 reports: objc_release_x26 + 16, x26 ends in 0x01 (for example 0x13c373a01) A nil actions value 0x0 becomes 0x1. A real pointer only has its low byte changed, so the isa read is off by one. In the +16 reports, x16 (0x8001000001fa8d89) is that isa shifted by one byte. This looks like a one-byte store of YES into the stack slot where x26 was saved across the callout. There is no single user action that reproduces it. It happens when the system delivers a scene settings update. The frame that wrote the byte is already gone, because the crash is recorded after the callout returns. Has anyone else seen this on iOS 27? I attached three .crash files with full register state to FB25454822.
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
1
Views
401
Activity
3d
A bug in iOS 27.3 beta 2 where the UIHingeInteraction value is received even though it is not an iPhone Duo device.
The device currently showing the symptom is iPhone SE3, iOS 27.3 Beta 2 version installed. (Same symptom exists in Beta 1 as well.) On screen A When switching to another ViewController (screen B) with pushViewController of UINavigationController Declare UIHingeInteraction on screen A and self.view.addInteraction(hInteraction) I added it like the code above. Hinge value comes in. In the sample code below update.hinge value is not nil The update.hinge!.angle value is also displayed as 0. let hInteraction:UIHingeInteraction = UIHingeInteraction { interaction, update in if update.hinge != nil { let hingeAngle:CGFloat = update.hinge!.angle..... }} In apps installed on other iPhone 17 devices (with iOS 27.2 installed), the value does not appear there. A quick fix is ​​needed. I have also submitted a report via Apple Feedback; please ensure this is addressed in the upcoming Beta 3 release. *** Plus *** The horizontalSizeClass and verticalSizeClass properties are returning "Regular" values, similar to how they behave on the iPhone Duo's internal display. Please fix the above issue as well.
Replies
0
Boosts
0
Views
117
Activity
3d
iOS 27b3 SDK: iOS App on Mac crashes on UISearchBar focus
Our app crashes when compiled with the iOS 27 beta 3 SDK and run as an iOS app on Mac, on both macOS 26 and macOS 27, as soon as a UISearchBar receives focus. The crash is due to this exception: *** Assertion failure in BOOL _screenBasedFocusUnsupported(void)(), UIScreen.m:3.725 Accessing the focus system through UIScreen is no longer supported. ( 0 CoreFoundation 0x000000018bea31c0 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000018b91e91c objc_exception_throw + 88 2 Foundation 0x000000018e092644 -[NSMutableDictionary(NSMutableDictionary) initWithContentsOfFile:] + 0 3 UIKitCore 0x00000001c5dae8ec _screenBasedFocusUnsupported + 272 4 UIKitCore 0x00000001c5dae960 -[UIScreen _preferredFocusedWindow] + 24 5 UIKitCore 0x00000001c4ea3a60 -[UIScreen _mainSceneReferenceBounds] + 200 6 UIKitCore 0x00000001c4ea3914 -[UIScreen _mainSceneBoundsForInterfaceOrientation:] + 40 7 UIKitCore 0x00000001c5708134 +[UINavigationBar defaultSizeForOrientation:] + 76 8 UIKitCore 0x00000001c6222c88 -[_UISearchPresentationController _layoutPresentationWithSize:transitionCoordinator:] + 704 9 UIKitCore 0x00000001c622296c -[_UISearchPresentationController containerViewWillLayoutSubviews] + 84 10 UIKitCore 0x00000001c549304c block_destroy_helper.13 + 25112 11 UIKitCore 0x00000001c549344c block_destroy_helper.13 + 26136 12 UIKitCore 0x00000001c4ea26a8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1648 13 QuartzCore 0x0000000196103dbc _ZN2CA5Layer15perform_update_EPS0_P7CALayerjNS_17LayerUpdateReasonEPNS_11TransactionE + 460 14 QuartzCore 0x000000019610390c _ZN2CA5Layer17update_if_needed_EPNS_11TransactionENS_17LayerUpdateReasonE + 692 15 QuartzCore 0x0000000196035d2c _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 608 16 QuartzCore 0x0000000195e69520 _ZN2CA11Transaction6commitEv + 652 17 AppKit 0x0000000190fe116c __37+[NSDisplayCycle currentDisplayCycle]_block_invoke.7 + 44 18 CoreFoundation 0x000000018be34ad0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28 19 CoreFoundation 0x000000018be34a10 __CFRunLoopDoBlocks + 396 20 CoreFoundation 0x000000018be33e54 __CFRunLoopRun + 2356 21 CoreFoundation 0x000000018bf06234 _CFRunLoopRunSpecificWithOptions + 532 22 HIToolbox 0x0000000198c1f560 RunCurrentEventLoopInMode + 320 23 HIToolbox 0x0000000198c228bc ReceiveNextEventCommon + 488 24 HIToolbox 0x0000000198dac14c _BlockUntilNextEventMatchingListInMode + 48 25 AppKit 0x00000001909163d0 _DPSBlockUntilNextEventMatchingListInMode + 228 26 AppKit 0x000000019026a084 _DPSNextEvent + 576 27 AppKit 0x0000000190dff96c -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688 28 AppKit 0x0000000190dff678 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72 29 AppKit 0x000000019025d13c -[NSApplication run] + 368 30 AppKit 0x00000001902357b0 NSApplicationMain + 880 31 AppKit 0x000000019047c958 +[NSWindow _savedFrameFromString:] + 0 32 UIKitMacHelper 0x00000001aa2651bc UINSApplicationMain + 972 33 UIKitCore 0x00000001c4e1aed4 UIApplicationMain + 144 34 UIKitCore 0x00000001c548bda0 block_destroy_helper.31 + 8880 35 DigitalConcertHall.debug.dylib 0x0000000106e41bd8 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 128 36 DigitalConcertHall.debug.dylib 0x0000000106e41b4c $s18DigitalConcertHall11AppDelegateC5$mainyyFZ + 32 37 DigitalConcertHall.debug.dylib 0x0000000106e4afc0 __debug_main_executable_dylib_entry_point + 28 38 dyld 0x000000018b9ac4e4 start + 6992 ) I could not test with the iOS 27 beta 4 SDK due to this blocking issue: https://developer.apple.com/forums/thread/839012 However, when I tried to set up a simple sample project, I could not reproduce the issue. Does anybody know what might be causing this? I filed feedback FB24201508
Replies
8
Boosts
2
Views
2.1k
Activity
5d
UIWindowScene sizeRestrictions minimumSize not working on iPadOS
Hello, following Apple docs and guidance from WWDC I'm trying to set a minimum size for my scene, for example I want it to minimally be 3/4 the width and height of the device. I've removed the UIRequiresFullScreen Info.plist property. The app does run in windowed mode and does have a resizing handle. I've implemented this UISceneDelegate: var window: UIWindow? var cameraWindow: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { window = UIWindow(windowScene: scene as! UIWindowScene) // setup root view controller let rootViewController: MainViewController = MainViewController(nibName: "Main", bundle: nil) let navController: NavigationController = NavigationController(rootViewController: rootViewController) navController.modalPresentationStyle = .fullScreen // set reasonable minimum sizes for WindowScene if let windowScene: UIWindowScene = scene as? UIWindowScene { if #available(iOS 16.0, *) { let windowSize: CGSize = windowScene.coordinateSpace.bounds.size windowScene.sizeRestrictions?.minimumSize.width = windowSize.width * 0.75 windowScene.sizeRestrictions?.minimumSize.height = windowSize.height * 0.75 } } window?.rootViewController = navController window?.makeKeyAndVisible() } } And proven via debugger that this code is being executed. I have the following observations: After setting these minimumSize properties I see the width and height both contain 0 afterwards, as if the property settings are discarding the value. I've even used hard-coded values instead of reading the coordinateSpace.bounds, to no avail. The scene is allowing resizing well below these minimums, about 1/3 the width and 1/2 the height. Anyone else observed this and have suggestions?
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
1
Views
372
Activity
5d
Using SF Symbols with a changed global locale
When changing the global locale by std::locale::global(std::locale(NAME)) where NAME is a valid and supported name of a locale all access using [UIImage systemImageNamed:@"..."] fails. Is there a way to modify the global locale and still have access to the SF Symbols?
Replies
2
Boosts
0
Views
279
Activity
5d
How to disable a custom detent in a UISheetPresentationController
If you are creating a UISheetPresentationController with custom detents and you have a need to disable one of the detents, then you can do so by returning a special value from the detent's resolver. This is addressed in the Objective-C documentation for customDetentWithIdentifier:resolver:. You return the special value UISheetPresentationControllerDetentInactive. For example: UISheetPresentationControllerDetent *customDetent = [UISheetPresentationControllerDetent customDetentWithIdentifier:@"customId" resolver:^CGFloat(id<UISheetPresentationControllerDetentResolutionContext> _Nonnull context) { if (some condition) { return UISheetPresentationControllerDetentInactive; } else { return context.maximumDetentValue / 3.0; } }];However, if you wish to do this in Swift, there is no corresponding API for UISheetPresentationControllerDetentInactive. It turns out that you can just use .greatestFiniteMagnitude instead. For example: let customDetent = UISheetPresentationController.Detent.custom(identifier: .init("customId")) { context in if some condition { return .greatestFiniteMagnitude //UISheetPresentationControllerDetentInactive } else { return context.maximumDetentValue / 3.0 } }It might be tempting to add the following: extension UISheetPresentationController.Detent { static let Inactive = CGFloat.greatestFiniteMagnitude }but this could cause a conflict if Apple adds a similar API in the future. This oversight in the Swift API has been reported as FB25567661.
Replies
1
Boosts
0
Views
126
Activity
1w
UIKIt, iOS 27, UIDocumentPickerViewController(forExporting: [fileURL])
My App saves files using the UIDocumentPickerViewController. This works from iOS 17 to 26. Usually, you have a file with a given name in your sandbox, which you can then export via the pickerVC. In the pickerVC you change the name. In iOS 27 the file name is greyed-out and you can't change it here. The file can be exported only with the pre-given name. Is this a new behaviour or bug in iOS 27?
Topic: UI Frameworks SubTopic: UIKit
Replies
2
Boosts
0
Views
170
Activity
1w
Adapting a large UIKit/Objective-C document viewer controller for iPhone Duo on the iOS 27.1 SDK
We ship a mature document viewer (PDF) written mostly in Objective-C with UIKit. It runs on iPhone and iPad and supports multiple scenes. We're planning support for iPhone Duo and would like advice on the right architectural approach before we start. Current structure (simplified) One root viewer view controller (a UIViewController subclass, large and long-lived) owns the document view, search, bookmarks, text-to-speech, presentation mode and similar features. Most of these live in categories and helper modules. Chrome is swapped by size class. A factory picks one of two "toolbars controller" classes based on the trait collection: one for compact, one for regular. The regular one also hosts a tab strip and a sidebar built on the system sidebar UI. When the class it would pick changes, traitCollectionDidChange: tears down the current chrome controller, builds the other one, re-parents the document view into the new container, and then restores tool and presentation state. We skip this while the app isn't active, because UIKit sends trait changes during backgrounding. Geometry changes go through viewWillTransitionToSize:withTransitionCoordinator:, which forwards to the chrome controller, the document view and a zoomed handwriting helper. When the transition completes we recompute content insets and re-render the output for an external display. The document view is a custom scroll-based view (not PDFKit). It has display modes for continuous, single page, two-page spread and two-page spread with a cover page. It calculates its own insets from safe areas and whatever chrome is visible. We still use traitCollectionDidChange: and haven't moved to registerForTraitChanges:. Questions Posture changes and size-class flips. When the device folds or unfolds, should we expect a normal viewWillTransitionToSize: plus a trait change (compact ↔ regular) that our existing swap handles? Or is there a posture/display-configuration signal we should observe instead? Swapping the whole chrome hierarchy in the middle of a fold animation seems costly. Is there a recommended way to defer or coordinate that with the transition coordinator? Hinge or seam area. Is the fold region exposed through safe-area insets, layout guides or a new API? A custom scroll view that lays out two-page spreads needs to keep content out of that region, or line the spread up with it. What's the recommended way to get this geometry from Objective-C? Two-page spread tied to posture. Showing a two-page spread automatically when the device is unfolded (like an open book) seems natural. Does Apple recommend deciding this from traits/posture or from bounds, and is there a trait we can override per view controller? Trait registration. For this form factor, is it effectively required to move from traitCollectionDidChange: to registerForTraitChanges: (for example to get notified about new traits), or will the legacy callback still fire reliably? Scenes and external displays. Does iPhone Duo change anything about scene activation, window geometry or UIScreen handling that a multi-scene app with external-display output should plan for? Incremental adoption. Can we adopt this step by step in Objective-C, or do some of the APIs only exist in Swift and push us toward Swift wrappers? Any pointers to WWDC sessions, sample code or documentation for adapting existing UIKit apps would be very helpful. Thanks!
Topic: UI Frameworks SubTopic: UIKit
Replies
4
Boosts
1
Views
380
Activity
1w
UISceneDelegate.sceneWillResignActive and sceneDidEnterBackground not called on iOS 27
In our UIKit app built with Xcode 27.2 / iOS 27 SDK, the foreground-to-background UISceneDelegate methods are not called when the app enters background. The matching UIApplication notifications are still posted. Environment: Device: iPhone 13 OS: iOS 27.2 Xcode: 27.2 (27B52) UIApplicationSupportsMultipleScenes: false SceneDelegate configured in Info.plist Observed: Launch: scene:willConnectToSession:options: sceneWillEnterForeground: sceneDidBecomeActive: Press Home / switch app / lock screen: (sceneWillResignActive: NOT called) (sceneDidEnterBackground: NOT called) Return to app: sceneWillEnterForeground: sceneDidBecomeActive: Evidence from file logging: [2026-11-12 11:28:05.502] sceneWillEnterForeground [2026-11-12 11:28:05.729] sceneDidBecomeActive [2026-11-12 13:25:45.077] sceneWillEnterForeground [2026-11-12 13:25:45.517] sceneDidBecomeActive No sceneWillResignActive or sceneDidEnterBackground entries. However, UIApplicationWillResignActiveNotification and UIApplicationDidEnterBackgroundNotification are delivered correctly. Expected: sceneWillResignActive: and sceneDidEnterBackground: should be called when leaving foreground. Workaround: We currently fall back to UIApplication notifications.
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
0
Views
73
Activity
1w
iPadOS 27.0.1: iPhone-only apps crash when displaying the Japanese Kana keyboard on iPad
We are seeing a crash when attempting to display the Japanese Kana keyboard (日本語-かな) in our iPhone-only app running on an iPad with iPadOS 27.0.1. The keyboard displays successfully in our app on iPadOS 26 and iPadOS 27.0. We also reproduced a similar crash in other iPhone-only apps downloaded from the App Store on the affected iPad. We have not yet confirmed whether those apps crash with the same exception. Our app logs the following exception: *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM insertObject:atIndex:]: index 15 beyond bounds [0 .. 2]' *** First throw call stack: ( 0x19fab7190 0x19f834380 0x19fa45734 0x1aee9f5bc 0x1aee3dc14 0x1aee3cb30 0x1aee3c4d4 0x1aee3ab0c 0x1a433798c 0x1a44a4120 0x1a449bd5c 0x1a42148c8 0x1a42143fc 0x1a4239d7c 0x1a421203c 0x1a3fc1338 0x1a3d12e0c 0x1a3d11ed0 0x1a52784ec 0x1a3d11abc 0x1a4115238 0x1a3d436d4 0x1a3d43a80 0x1a44eea14 0x1aabb8ef8 0x1a517161c 0x1a5152450 0x1a5153388 0x1a41f20c4 0x1a49e3fec 0x1a426598c 0x1a42657fc 0x1a4265580 0x1a3d62b30 0x1a3d62984 0x1a95c4dac 0x1a994fb68 0x1a95c5514 0x1a95c287c 0x1a95d2608 0x1a3d6841c 0x1a3d6a298 0x1a4263874 0x1a3d60bdc 0x1a3ce8d78 0x1a3ce7b88 0x1a3ce7928 0x2d1482bc0 0x19fa78c20 0x19fa78b94 0x19fa5a268 0x19fa59384 0x19fa5a7f4 0x249e6ff24 0x1a3d381cc 0x1a9d27404 0x1a9d20b50 0x1a9d20a10 0x109042dc4 0x109042e04 0x19f8ab5b8 ) libc++abi: terminating due to uncaught exception of type NSException Steps to reproduce: Enable the Japanese – Kana keyboard in the iPad’s keyboard settings. Open an affected iPhone-only app on an iPad running iPadOS 27.0.1. Tap a text input field and attempt to display the Japanese Kana keyboard. The app crashes. We suspect this may be a regression involving iPhone compatibility mode on iPad and the Japanese Kana keyboard, but we have not yet identified the failing component in a symbolicated stack trace. We have submitted a report through Feedback Assistant: FB24985530. Has anyone else encountered this behavior? Are there any known workarounds we can apply in the app while this is being investigated?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
8
Boosts
7
Views
2.0k
Activity
1w
iPhone Duo: Keep app on inner display while hinge is open (like Clock)?
Hi! I'm building a night-light app for iPhone Duo. When the device is partly open in tent mode, the lamp starts on the inner display. As soon as I set the phone down on a table, the system moves my window to the outer display, even though the hinge stays open. Apple's Clock app stays on the inner display in the same pose, so it seems possible at the system level. Steps Open iPhone Duo to ~80° (tent). Launch the app on the inner display. Set the device down on a table. Observed (logged from the app) UIHinge.status stays .partiallyOpen (~80°), not .closed. UIDevice.orientation goes portraitUpsideDown → faceDown → landscapeRight. UIScreen.didDisconnectNotification fires and UIScreen.screens drops the inner screen. The window moves to the outer screen (466×678). What I've tried Restricting UISupportedInterfaceOrientations to portrait only Turning on Rotation Lock Reading UIHingeInteraction (read-only, no effect on display routing) Looking at UISceneAccessory.cameraCapture, which only applies with an active capture session and a fully open device Question Is there a supported way for a scene to prefer or stay on the inner display while the hinge isn't closed? If not, I'll file a Feedback Assistant request. iPhone Duo · iOS 27.2 · Xcode 27.2
Replies
1
Boosts
0
Views
71
Activity
1w
Request to remove horizontal blank space for keyboard extensions on iPhone Duo.
I have a custom iOS keyboard extension app. On iPhone Duo, the system forces keyboard extensions inside a container that is narrower than the phone's screen, specifically by adding extra 7 points on the leading and trailing edge in portrait. This creates both a visual and functional blank space on both sides of the keyboard. My keyboard relies on side swipes, which are much more annoying to perform when the keyboard does not occupy full width of the screen. All other devices iPhones before the Duo propely stretch the keyboard to full width, so this is a new issue. Please, reconsider this decision. I believe a better way to handle this is by setting the safe area layout, instead of limiting the container's width itself. I don't see any benefit to protecting these 7 points on each side. Keyboards that don't care will still stay within the limit by respecting the horizontal safe area, while others would get the benefit of better customization.
Replies
0
Boosts
0
Views
112
Activity
1w