I think in the next updates of IOS 26 that Apple should add a setting to enable/disable Liquid Glass because we all know that everybody doesnt like the new update.
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
When tapping a UIButton I present a view controller like this:
let vc = ViewController()
present(vc, animated: true, completion: nil)
Inside, I set a clear background with a visual effect view with a blur effect, like this:
view.backgroundColor = .clear
blurEffectView = UIVisualEffectView(effect: UIBlurEffect(style: .regular))
//autolayout constraints for the blurEffectView
view.addSubview(blurEffectView)
But the background remains full white in iOS 26.
How can I bring the blur+transparency back like in iOS 18? What am I doing wrong?
Hi everyone,
I’m running into a strange issue with UISearchController placement with iOS 26 SDK.
In one of my view controllers, I was able to move the search bar to the top of the navigation bar by setting:
navigationItem.searchController = searchController
navigationItem.hidesSearchBarWhenScrolling = false
navigationItem.preferredSearchBarPlacement = .stacked
This works as expected — the search bar is placed at the top.
However, in another view controller with almost identical configuration, the search bar always shows up at the bottom. If I delay the setup with DispatchQueue.main.async, it appears at the bottom; if I don’t, it doesn’t appear at all. Both VCs are wrapped in their own UINavigationController.
So my questions are:
Has anyone faced this issue where preferredSearchBarPlacement = .stacked is ignored?
Are there hidden requirements or limitations for placing the search bar at the top?
Why could the same setup behave differently in two controllers?
Any help or ideas would be appreciated!
آلَحـ🇾🇪ᬼ⃝⃡Wٌـّاج
this string cause a crash on iOS 26 when sett label.text
Crashed: com.apple.main-thread
0 CoreText 0xf720c std::__1::__hash_table<std::__1::__hash_value_type<long, CGPoint>, std::__1::__unordered_map_hasher<long, std::__1::__hash_value_type<long, CGPoint>, std::__1::hash, std::__1::equal_to, true>, std::__1::__unordered_map_equal<long, std::__1::__hash_value_type<long, CGPoint>, std::__1::equal_to, std::__1::hash, true>, std::__1::allocator<std::__1::__hash_value_type<long, CGPoint>>>::erase(std::__1::__hash_const_iterator<std::__1::__hash_node<std::__1::__hash_value_type<long, CGPoint>, void*>>) + 300
1 CoreText 0xf63d4 TGlyphComposer::ComposeGlyphs(long, TInlineVector<unsigned short, 30ul> const&, TInlineVector<long, 30ul> const&) + 2896
2 CoreText 0x8b018 TCombiningEngine::ResolveCombiningMarks(TCombiningEngine::CombiningFlag, bool, bool*) + 2232
3 CoreText 0x4edf0 TKerningEngine::PositionGlyphs(TRunGlue&, TCharStream const&, signed char) + 1108
4 CoreText 0x4eee8 TTypesetter::FinishLayout(std::__1::tuple<TLine const*, TCharStream const*, void const* ()(__CTRun const, __CFString const*, void*), void*, std::__1::shared_ptr, unsigned int, unsigned char, bool, long> const&, TRunGlue&, signed char, SyncState) + 64
5 CoreText 0x34608 TTypesetterAttrString::Initialize(__CFAttributedString const*, bool) + 3300
6 CoreText 0x34d88 TTypesetterAttrString::TTypesetterAttrString(__CFAttributedString const*, __CFDictionary const*, bool) + 160
7 CoreText 0x34c38 CTLineCreateWithAttributedString + 84
8 UIFoundation 0x6204 __NSCoreTypesetterCreateBaseLineFromAttributedString + 704
9 UIFoundation 0xafd38 -[NSCoreTypesetter _stringDrawingCoreTextEngineWithOriginalString:rect:padding:graphicsContext:forceClipping:attributes:stringDrawingOptions:drawingContext:stringDrawingInterface:] + 2652
10 UIFoundation 0x26bc __NSStringDrawingEngine + 1592
11 UIFoundation 0xab308 -[NSString(NSExtendedStringDrawing) boundingRectWithSize:options:attributes:context:] + 164
12 UIKitCore 0x186a978 + 132
13 UIKitCore 0x48a7c + 668
14 UIKitCore 0x186b35c + 444
15 UIKitCore 0x186eb30 + 408
16 UIKitCore 0x486d4 + 136
17 UIKitCore 0x47c1c + 80
18 UIKitCore 0x1b68e4 + 80
19 UIKitCore 0x1867c08 + 760
20 UIKitCore 0x18678ec + 72
21 UIKitCore 0x186be30 + 104
.......
28 UIKitCore 0xa894e0 + 52
29 UIKitCore 0x19047fc + 76
30 UIKitCore 0xa88b0c + 1196
31 UIKitCore 0xa91ce0 + 524
32 UIKitCore 0xa9222c + 280
33 UIKitCore 0xa90550 + 3036
34 UIKitCore 0x1e1604 + 280
35 UIKitCore 0x27078 + 912
36 UIKitCore 0x27b38 + 40
37 UIKitCore 0x190df68 + 2532
38 QuartzCore 0xac8bc + 116
39 QuartzCore 0x8f2fc + 600
40 QuartzCore 0xadf84 + 200
41 QuartzCore 0x6ef78 + 536
42 QuartzCore 0x9bab0 + 644
43 QuartzCore 0xa93c0 + 88
44 UIKitCore 0x780f0 + 52
45 UIKitCore 0x78024 + 352
46 UIKitCore 0x85ee8 + 128
47 UIKitCore 0x85378 + 60
48 UpdateCycle 0x15f8 UC::DriverCore::continueProcessing() + 84
49 CoreFoundation 0x6a230 + 28
50 CoreFoundation 0x6a1a4 + 172
51 CoreFoundation 0x47c6c + 232
52 CoreFoundation 0x1d8b0 + 820
53 CoreFoundation 0x1cc44 + 532
54 GraphicsServices 0x1498 GSEventRunModal + 120
55 UIKitCore 0xa9ddc + 792
56 UIKitCore 0x4eb0c UIApplicationMain + 336
57 UIKitCore 0x18a860 + 588
59 ??? 0x18c7cae28 (缺少)
Hi all,
I’m working on a UIKit app where I embed a SwiftUI TextField using UIHostingController. I’m using an ObservableObject model to drive the textfield content:
class TextFieldModel: ObservableObject {
@Published var text: String
@Published var placeholder: String
@Published var isSecure: Bool
@Published var isFocused: Bool
init(pText: String, pPlaceholder: String, pIsSecure: Bool, pIsFocused: Bool) {
self.text = pText
self.placeholder = pPlaceholder
self.isSecure = pIsSecure
self.isFocused = pIsFocused
}
}
And my SwiftUI view:
struct TextFieldUI: View {
@ObservedObject var pModel: TextFieldModel
@FocusState private var pIsFocusedState: Bool
var body: some View {
TextField(pModel.placeholder, text: $pModel.text)
.focused($pIsFocusedState)
}
}
I embed it in UIKit like this:
let swiftUIContentView = TextFieldUI(pModel: model)
let hostingController = UIHostingController(rootView: swiftUIContentView)
addChild(hostingController)
view.addSubview(hostingController.view)
hostingController.didMove(toParent: self)
Question:
In UIKit, if I subclass UITextField, I can override insertText(_:) and choose not to call super, effectively preventing the textfield from updating when the user types.
Is there a SwiftUI equivalent to intercept and optionally prevent user input in a TextField, especially when it’s embedded inside UIKit?
What is the recommended approach in SwiftUI for this?
Same PDF renders differently when open in Chrome, Safari; Apple Preview, Acrobat.
on Apple Preview, Safari - the PDF appears correctly for a second or two and then appears washed out.
Our app uses Safari to render PDFs and our users are complaining that scanned PDFs are not rendering properly.
How do I fix this issue (Swift, Obj-C)?
Description:
1. When initiating the print flow via UIPrintInteractionController, and no printer is initially connected, iOS displays all possible paper sizes in the paper selection UI. However, if a printer connects in the background after this view is shown, the list of paper sizes does not automatically refresh to reflect only the options supported by the connected printer.
2. If the user selects an incompatible paper size (one not supported by the printer that has just connected), the app crashes due to an invalid configuration.
Steps to Reproduce:
Launch the app and navigate to the print functionality.
Tap the Print button to invoke UIPrintInteractionController.
At this point, no printer is yet connected. iOS displays all available paper sizes.
While the paper selection UI is visible, the AirPrint-compatible printer connects in the background.
Without dismissing the controller, the user selects a paper size (e.g., one that is not supported by the printer).
The app crashes.
Expected Result: App should not crash
Once the printer becomes available (connected in the background), the paper size options should refresh automatically.
The list should be filtered to only include sizes that are compatible with the connected printer.
This prevents the user from selecting an invalid option, avoiding crashes.
Actual Result: App crashes
The paper size list remains unfiltered.
The user can still select unsupported paper sizes.
Selecting an incompatible option causes the app to crash, due to a mismatch between UI selection and printer capability.
Demo App Crash : https://drive.google.com/file/d/19PV02wzOJhc2DYI6kAe-uxHuR1Qg15Bu/view?usp=sharing
Apple Files App Crash: https://drive.google.com/file/d/1flHKuU_xaxHSzRun1dYlh8w7nBPJZeRb/view?usp=sharing
On iPad running iOS 26, UIKeyboardType.decimalPad sometimes appears as a floating keypad (compact panel) instead of the docked, full-width keyboard. Our app attaches a custom toolbar via inputAccessoryView, so the floating keypad hides the toolbar and breaks the flow. We’d like to opt out of the floating keypad or force the keyboard to remain docked when a toolbar is present.
Environment
Device: iPad (multiple models)
OS: iPadOS 26.0
App type: UIKit
Field: UITextField with keyboardType = .decimalPad
We present a custom toolbar via inputAccessoryView
Expected
Docked (full-width) keyboard so the inputAccessoryView toolbar is visible and sized correctly.
Actual
A floating decimal keypad appears and covers content; our accessory toolbar isn’t visible/attached to it.
Why this matters
Our toolbar contains required domain actions (Done/Next, Previous). When the keypad floats, the user loses these controls.
Questions
Is there a supported way to opt out of the floating numeric keypad on iPad when using decimalPad?
Is there an API/trait to prefer docked keyboard (e.g., when an inputAccessoryView is present)?
I have an App which supports multiple windows on the iPad. The App can receive URLs from other Apps (via application.openURL()) and also files via "share sheet" (via UIActivityViewController).
When receiving a URL from another App the delegate method
scene(_ scene: UIScene, openURLContexts URLContexts: Set)
will be called on an existing UIScene, however when a file is received through the share sheet from another App, a new UIScene is created and therefore also a new window (eg the delegates
application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions)
and
scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)
are called).
In both cases I do get the URL and file just fine, however I do not want to get new UIScenes and windows created when receiving a file via share sheet.
How can I prevent to get a new UIScene or window? The received files should be used in the existing windows and should not create new ones.
I'm working on an AppIcon selector and would like to do something like UIImage(named: "AppIcon-Alternate") to present the icon for the user to choose using the new IconComposer icons.
I've done a fair bit of research on this and it looks like this used to be possible (prior to .icon) with workarounds that were later 'fixed' / removed (appending 60x60 to the icon name).
The only 'solution' seems to be bundling the exported images into the app itself but this seems like a terrible idea as it massively bloats the app. Assuming we export from the new IconComposer tool and want to include dark mode that's roughly 3MB per icon which is absolutely shocking bloat and so a terrible solution.
Looking into the app the Assets.car actually generates png files for these alternate icons. These are in the json as "MultiSized Image" assets. Interestingly using UIImage(named: is actually attempting to load these but fails to resolve an kCSIElementSignature. Also the OS alert when switching alternate icon shows a preview of the icon so this must be privately possible and using Asset Catalog Tinkerer I'm able to see these pngs.
This feels like broken API; I'd guess the new icon format is not correctly generating the entry in the Asset.car to link the generated pngs for usage with UIImage(named:) API.
Does anyone have pointers for this? This feels like a developer API afterthought or bug but is it intentional?
Edit: I've submitted feedback for this FB20341182.
In the WWDC 2025 session "Build a UIKit app with the with the new design", at the 23:22 mark, the presenter says:
And finally, when you no longer need the glass on screen animate it out by setting the effect to nil.
The video shows a UIVisualEffectView whose effect is set to a UIGlassEffect animating away as its effect is set to nil. But when I do this in my app (or a sample app), setting effect to nil does not remove the glass appearance. Is this expected? Is the video out of date? Or is this a bug?
How does one know the fitting width of a UIDatePicker in a selector hooked up with UIControlEventValueChanged? By fitting width, I mean the width of the grey background rounded box displayed with the date -- I need to get the width of that whenever the date is changed.
import UIKit
class KeyboardViewController: UIInputViewController {
// MARK: - Properties
private var keyboardView: KeyboardView!
private var heightConstraint: NSLayoutConstraint!
private var hasInitialLayout = false
// 存储系统键盘高度和动画参数
private var systemKeyboardHeight: CGFloat = 300
private var keyboardAnimationDuration: Double = 0.25
private var keyboardAnimationCurve: UIView.AnimationOptions = .curveEaseInOut
// MARK: - Lifecycle
override func viewDidLoad() {
super.viewDidLoad()
setupKeyboard()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// 在视图显示前更新键盘高度,避免闪动
if !hasInitialLayout {
hasInitialLayout = true
}
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
}
// MARK: - Setup
private func setupKeyboard() {
// 创建键盘视图
keyboardView = KeyboardView()
keyboardView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(keyboardView)
// 设置约束 - 确保键盘贴紧屏幕底部
NSLayoutConstraint.activate([
keyboardView.leftAnchor.constraint(equalTo: view.leftAnchor),
keyboardView.rightAnchor.constraint(equalTo: view.rightAnchor),
keyboardView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])
// 设置初始高度约束(使用系统键盘高度或默认值)
let initialHeight = systemKeyboardHeight
heightConstraint = keyboardView.heightAnchor.constraint(equalToConstant: initialHeight)
heightConstraint.isActive = true
}
// MARK: - Layout Events
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
}
override func viewSafeAreaInsetsDidChange() {
super.viewSafeAreaInsetsDidChange()
}
// MARK: - 键盘高度请求
// 这个方法可以确保键盘扩展报告正确的高度给系统
override func updateViewConstraints() {
super.updateViewConstraints()
// 确保我们的高度约束是最新的
if heightConstraint == nil {
let height = systemKeyboardHeight > 0 ? systemKeyboardHeight : 216
heightConstraint = NSLayoutConstraint(
item: self.view!,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .notAnAttribute,
multiplier: 0.0,
constant: height
)
heightConstraint.priority = UILayoutPriority(999)
view.addConstraint(heightConstraint)
} else {
let height = systemKeyboardHeight > 0 ? systemKeyboardHeight : 216
heightConstraint.constant = height
}
}
}
// MARK: - Keyboard View Implementation
class KeyboardView: UIView {
private var keysContainer: UIStackView!
override init(frame: CGRect) {
super.init(frame: frame)
setupView()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
setupView()
}
private func setupView() {
backgroundColor = UIColor(red: 0.82, green: 0.84, blue: 0.86, alpha: 1.0)
// 创建按键容器
keysContainer = UIStackView()
keysContainer.axis = .vertical
keysContainer.distribution = .fillEqually
keysContainer.spacing = 8
keysContainer.translatesAutoresizingMaskIntoConstraints = false
addSubview(keysContainer)
// 添加约束 - 确保内容在安全区域内
NSLayoutConstraint.activate([
keysContainer.topAnchor.constraint(equalTo: safeAreaLayoutGuide.topAnchor, constant: 8),
keysContainer.leftAnchor.constraint(equalTo: safeAreaLayoutGuide.leftAnchor, constant: 8),
keysContainer.rightAnchor.constraint(equalTo: safeAreaLayoutGuide.rightAnchor, constant: -8),
keysContainer.bottomAnchor.constraint(equalTo: safeAreaLayoutGuide.bottomAnchor, constant: -8)
])
// 添加键盘行
}
}
Summary:
When running our iPad app on macOS (“Designed for iPad”), invoking
UIPrintInteractionController intermittently fails to show a working print sheet. The same code works reliably on iPad or iOS devices and also on macOS pre 26.
This regression started after updating to macOS Tahoe Version 26.0 (25A354)
Steps to Reproduce:
Launch the attached minimal sample on macOS (Designed for iPad).
Tap “Print plain text”
Expected Results:
The print panel should appear and discover AirPrint printers reliably, as on iPad/iOS or previous mac versions.
Actual Results:
On macOS, the panel fails to appear.
Mac version:
macOS Tahoe 26.0 (25A354)
xCode version:
26.0 (17A324)
Sample Reproduction Code:
struct ContentView: View {
var body: some View {
Button("Print plain text") {
printPlainText()
}
.buttonStyle(.borderedProminent)
.padding()
}
func printPlainText() {
let text = "This is just a sample print"
guard UIPrintInteractionController.isPrintingAvailable else {
NSLog("Printing not available on this device")
return
}
let info = UIPrintInfo(dictionary: nil)
info.outputType = .general
info.jobName = "Plain Text"
let formatter = UISimpleTextPrintFormatter(text: text)
formatter.perPageContentInsets = UIEdgeInsets(top: 36, left: 36, bottom: 36, right: 36)
let ctrl = UIPrintInteractionController.shared
ctrl.printInfo = info
ctrl.printFormatter = formatter
DispatchQueue.main.async {
ctrl.present(animated: true) { _, completed, error in
if let error { NSLog("Print error: \(error.localizedDescription)") }
else { NSLog(completed ? "Print completed" : "Print cancelled") }
}
}
}
}
Also I have added the following values to info.plist:
<key>NSLocalNetworkUsageDescription</key>
<string>This app needs local network access to discover AirPrint printers.</string>
<key>NSBonjourServices</key>
<array>
<string>_ipp._tcp.</string>
<string>_ipps._tcp.</string>
<string>_printer._tcp.</string>
</array>
When trying to use a UISearchController setup with a UISearchBar that has scope buttons, the search controller's scopeBarActivation property is set to .onSearchActivation, the navigation item's preferredSearchBarPlacement property is set to .integrated. or .integratedButton, and the search bar/button appears in the navigation bar, then the scope buttons never appear. But space is made for where they should appear.
Some relevant code in a UIViewController shown as the root view controller of a UINavigationController:
private func setupSearch() {
let sc = UISearchController(searchResultsController: UIViewController())
sc.delegate = self
sc.obscuresBackgroundDuringPresentation = true
// Setup search bar with scope buttons
let bar = sc.searchBar
bar.scopeButtonTitles = [ "One", "Two", "Three", "Four" ]
bar.selectedScopeButtonIndex = 0
bar.delegate = self
// Apply the search controller to the nav bar
navigationItem.searchController = sc
// BUG - Under iOS/iPadOS 26 RC, using .onSearchActivation results in the scope buttons never appearing at all
// when using integrated placement in the nav bar.
// Ensure the scope buttons appear immediately upon activating the search controller
sc.scopeBarActivation = .onSearchActivation
// This works but doesn't show the scope buttons until the user starts typing - that's too late for my needs
//sc.scopeBarActivation = .automatic
if #available(iOS 26.0, *) {
// Under iOS 26 put the search icon in the nav bar - same issue for .integrated and .integratedButton
navigationItem.preferredSearchBarPlacement = .integrated // .integratedButton
// My toolbar is full so I need the search in the navigation bar
navigationItem.searchBarPlacementAllowsToolbarIntegration = false // Ensure it's in the nav bar
} else {
// Under iOS 18 put the search bar in the nav bar below the title
navigationItem.preferredSearchBarPlacement = .stacked
}
}
I need the search bar in the navigation bar since the toolbar is full. And I need the scope buttons to appear immediately upon search activation.
This problem happens on any real or simulated iPhone or iPad running iOS/iPadOS 26 RC.
Dear Apple Support,
We are encountering an issue with deep linking on iOS 26 when using Safari and App Store redirection. Below are the detailed steps to reproduce the problem:
The app is not installed on the device.
User clicks on a Branch link:
For example:- https://qewed.app.link/99u88ef9f?uuid=88dbwh5ubd4b
Safari opens and displays the fallback page.
User taps on “Get the App”, which navigates to the App Store.
User installs and opens the app.
Expected Behavior:
The app should receive the Branch link parameters (in this case, uuid=88dbwh5ubd4b) upon first open.
Actual Behavior:
The app opens successfully, but the uuid parameter is not passed to the app.
This issue seems specific to the Safari → App Store → App flow on iOS 26, as other flows behave correctly.
Could you please advise whether this is a known issue or if there are recommended adjustments on our side to ensure parameters are consistently delivered after App Store redirection?
Note: We are using Branch SDK version 3.11.0 (Cocoapods dependency)
Thank you for your assistance.
Hey there,
Link to the sample project: https://github.com/dev-loic/AppleSampleScrolling
Context
We are working on creating a feed of posts in SwiftUI. So far, we have successfully implemented a classic feed that opens from the top, with bottom pagination — a standard use case.
Our goal, however, is to allow the feed to open from any post, not just the first one.
For example, we would like to open the feed directly at the 3rd post and then trigger a network call to load elements both above and below it.
Our main focus here is on preserving the scroll position while opening the screen and waiting for the network call to complete.
To illustrate the issue, I created a sample project (attached) with two screens:
MainView, which contains buttons to open the feed in different states.
ScrollingView, which initially shows a single element, simulates a 3-second network call, and then populates with new data depending on which button was tapped.
I am currently using Xcode 26 beta 6, but I can also reproduce this issue on Xcode 16.3.
Tests on sample project
I click on a button and just wait the 3 seconds for the call.
In this scenario, I expect that the “focused item” stays at the exact same place on the screen. I also expect to see items below and above being added.
Simulator iPhone 16 / iOS 18.4 with itemsHeight = 100
position = 0, 1, 2, 3 ⇒ works as expected
position = 4, 5, 6, 7, 8, 9 ⇒ scroll is reset to the top and we loose the focused item
Simulator iPhone 16 / iOS 18.4 with itemsHeight = 500
position = 0, 1, 2, 3, 4 ⇒ works as expected
position = 5, 6, 7 ⇒ I have a glitch (the focused element moves on the screen) but the focused element is still visible
position = 8, 9 ⇒ scroll is reset to the top and we loose the focused item
Simulator iPhone 16 / iOS 26 with itemsHeight = 100 or 500
position = 0, 1, 2, 3, 4 ⇒ works as expected
position = 5, 6, 7, 8, 9 ⇒ I have a glitch (the focused element moves on the screen) but the focused element is still visible
Device iPhone 15 / iOS 26 with itemsHeight = 100
position = 0, 1, 2, 3, 4 ⇒ works as expected
position = 5, 6, 7, 8, 9 ⇒ I have a glitch (the focused element moves on the screen) but the focused element is still visible
Device iPhone 15 / iOS 26 with itemsHeight = 500
position = 0, 1, 2, 3 ⇒ works as expected
position = 4, 5, 6, 7, 8, 9 ⇒ I have a glitch (the focused element moves on the screen) but the focused element is still visible
Not any user interaction
Moreover, in this scenario, the user does not interact with the screen during the simulated network call. Regardless of the situation, if the ScrollView is in motion, its position always resets to the top. This behavior prevents us from implementing automatic pagination when scrolling upward, which is ultimately our goal.
My conclusion so far
As far as I know it seems not possible to have both keeping scroll possible and upward automatic pagination using a SwiftUI LazyVStack inside a ScrollView.
This appears to be standard behavior in messaging apps or other feed-based apps, and I’m wondering if I might be missing something.
Thank you in advance for any guidance you can provide on this topic.
Cheers
Hello,
I have been receiving crash reports on iOS 26 related to a view containing a UITextField. Although I have not been able to reproduce the issue locally and the exact reproduction steps are unknown, the call stack suggests the crash may be related to language or input method changes.
If anyone has encountered a similar crash on iOS 26 or has any insights regarding language/input-related issues impacting UITextField behavior, your help would be greatly appreciated. The call stack from the reports is attached below.
Exception
NSInvalidArgumentException
-[__NSPlaceholderArray initWithObjects:count:]
attempt to insert nil object from objects[1]
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0xc98c8 __exceptionPreprocess
1 libobjc.A.dylib 0x317c4 objc_exception_throw
2 CoreFoundation 0xe1d7c -[__NSPlaceholderArray initWithObjects:count:]
3 CoreFoundation 0x1485d0 +[NSArray arrayWithObjects:count:]
4 UIKitCore 0xfc4d44 -[UIInlineInputSwitcher updateInputModes:withHUD:]
5 UIKitCore 0xfc4fe0 -[UIIndicatorInputSwitcher switchMode:withHUD:withDelay:]
6 UIKitCore 0xfc31d4 -[UIInputSwitcher showsLanguageIndicator:]
7 UIKitCore 0xa16dc8 __140-[_UIKeyboardStateManager _setupDelegate:delegateSame:hardwareKeyboardStateChanged:endingInputSessionIdentifier:force:delayEndInputSession:]_block_invoke_4
8 libdispatch.dylib 0x1abc _dispatch_call_block_and_release
9 libdispatch.dylib 0x1b7cc _dispatch_client_callout
10 libdispatch.dylib 0x38af0 _dispatch_main_queue_drain.cold.5
11 libdispatch.dylib 0x10ea8 _dispatch_main_queue_drain
12 libdispatch.dylib 0x10de4 _dispatch_main_queue_callback_4CF
13 CoreFoundation 0x6b520 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
14 CoreFoundation 0x1dd14 __CFRunLoopRun
15 CoreFoundation 0x1cc44 _CFRunLoopRunSpecificWithOptions
16 GraphicsServices 0x1498 GSEventRunModal
17 UIKitCore 0xaa6d8 -[UIApplication _run]
18 UIKitCore 0x4ec24 UIApplicationMain
Thank you!
When preparing the app for the new iOS 26, I came across an unpleasant design decision. Specifically, in the new design, the keyboard has rounded corners, under which the system background is visible. And here we have only two options, a light/dark background, which breaks all keyboard calls in the application.
Can you tell me if there is any way around this problem?
I'm using UIDocumentPickerViewController to open a url. Works fine in debug mode but version on the App Store is failing.
Code to create the document picker is like:
NSArray *theTypes = [UTType typesWithTag:@"docxtensionhere" tagClass:UTTagClassFilenameExtension conformingToType:nil];
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc]initForOpeningContentTypes:theTypes];
documentPicker.delegate = self;
[self presentViewController:documentPicker animated:YES completion:nil];
So in debug mode this is all gravy. -documentPicker:didPickDocumentsAtURLs: passes back a URL and I can read the file.
In release mode I get a URL but my app is denied access to read the file. After inspecting some logging it appears the sandbox is not granting my app permission.
error Domain=NSCocoaErrorDomain Code=257 "The file “Filename.fileextensionhere” couldn’t be opened because you don’t have permission to view it." UserInfo={NSFilePath=/private/var/mobile/Library/Mobile Documents/comappleCloudDocs/Filename.fileextensionhere, NSUnderlyingError=0x2834c9da0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
--
If I'm doing something wrong with UIDocumentPickerViewController it is a real shame that permission is not being denied in Debug mode, as devs are more likely to catch in prior to release. Anyone know where I'm going wrong and if not have a workaround? Thanks in advance.