iOS is the operating system for iPhone.

Posts under iOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

iOS26 beta ToolbarItem with placement to principal width is not fill to screen
I’m trying to add a TextField to the toolbar using .principal placement, and I want it to either fill the screen width or expand based on the surrounding content. However, it’s not resizing as expected — the TextField only resizes correctly when I provide a hardcoded width value. This behavior was working fine in previous versions of Xcode, but seems to be broken in Xcode 26. Not sure if this is an intentional change or a bug. i am using iOS26 beta and Xcode 26 beta struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() .toolbar { ToolbarItem(placement: .principal) { HStack { TextField("Search", text: .constant("")) .textFieldStyle(.roundedBorder) .frame(maxWidth: .infinity) // .frame(width: 300) Button("cancel") { } } .frame(maxWidth: .infinity) } } } } #Preview { NavigationView { ContentView() } }
0
0
95
Jun ’25
Is it possible to scan for nearby WiFi networks and connect to a device in AP mode on iOS?
In our iOS application, we need to list available WiFi networks so that users can select one for device configuration. Here's the workflow: Initially, the hardware device acts as a WiFi Access Point (AP). The app should scan for nearby WiFi networks to detect the device's AP. The app connects temporarily to this AP and sends the selected WiFi credentials to the device. The device then connects to the selected WiFi network and stops broadcasting its AP. Is this flow achievable on iOS? We understand that Apple restricts access to WiFi scanning APIs — are there any supported methods (e.g., using NEHotspotHelper) or entitlements (such as MFi) that could enable this?
2
2
104
Jun ’25
Feedback on the new Camera app icon in iOS 26
I’m currently using the iOS 26 Developer Beta and noticed the new icon design for the Camera app. Personally, I preferred the previous icon it looked cleaner, more elegant, and felt more in line with Apple’s signature iOS design language. The new icon feels more like something you’d expect from Android. It lacks the minimalist, refined style that usually defines iOS icons. I understand UI evolves over time, but this change feels like a step away from what makes Apple’s design philosophy unique. Just wanted to share this honest feedback as a long-time user and developer. Thanks for considering!
Topic: Design SubTopic: General Tags:
2
0
83
Jun ’25
Unable to find Slider/UISlider neutralValue
An WWDC 25 a neutral value was demonstrated that allows the Slider to be 'coloured in' from the point of the neutral value to the current thumb position. Trying to use this in Dev release 1 I get errors saying no such modifier. Was this functionality released in Dev Release 1 or am I using it incorrectly?
5
2
97
Jun ’25
How to initialize OpenIntent parameter when returning OpensIntent in perform
I have an app that lets you create cars. I have a CarEntity, an OpenCarIntent, and a CreateCarIntent. I want to support the Open When Run option when creating a car. I understand to do this, you just update the return type of your perform function to include & OpensIntent, then change your return value to include opensIntent: OpenCarIntent(target: carEntity). When I do this, I get a compile-time error: Cannot convert value of type 'CarEntity' to expected argument type 'IntentParameter<CarEntity>' What am I doing wrong here? struct CreateCarIntent: ForegroundContinuableIntent { static let title: LocalizedStringResource = "Create Car" @Parameter(title: "Name") var name: String @MainActor func perform() async throws -> some IntentResult & ReturnsValue<CarEntity> & OpensIntent { let managedObjectContext = PersistenceController.shared.container.viewContext let car = Car(context: managedObjectContext) car.name = name try await managedObjectContext.perform { try managedObjectContext.save() } let carEntity = CarEntity(car: car) return .result( value: carEntity, opensIntent: OpenCarIntent(target: carEntity) // FIXME: Won't compile ) } } struct OpenCarIntent: OpenIntent { static let title: LocalizedStringResource = "Open Car" @Parameter(title: "Car") var target: CarEntity @MainActor func perform() async throws -> some IntentResult { await UIApplication.shared.open(URL(string: "carapp://cars/view?id=\(target.id)")!) return .result() } }
2
0
94
Jun ’25
Stuck in assistive access
i have installed the ios 26 developer beta on iphone se2 and i was testing on my phone then i got stuck on assistive access and i am not able return from there i have tried rebooting then nothing is happening there i see the some option when i pressed and hold power button and volume down for few second there is the option to exit but when i tap on it it freeze for few second it land on the lock screen of that assistive access
1
0
60
Jun ’25
How to listen for Locale change event in iOS using NSLocale.currentLocaleDidChangeNotification?
I have the following function private func SetupLocaleObserver () { NotificationCenter.default.addObserver ( forName: NSLocale.currentLocaleDidChangeNotification, object: nil, queue: .main ) {_ in print ("Locale changed to: \(Locale.current.identifier)"); } } I call this function inside the viewDidLoad () method of my view controller. The expectation was that whenever I change the system or app-specific language preference, the locale gets changed, and this change triggers my closure which should print "Locale changed to: " on the console. However, the app gets terminated with a SIGKILL whenever I change the language from the settings. So, it is observed that sometimes my closure runs, while most of the times it does not run - maybe the app dies even before the closure is executed. So, the question is, what is the use of this particular notification if the corresponding closure isn't guaranteed to be executed before the app dies? Or am I using it the wrong way?
1
0
67
Jun ’25
Xcode26 build app with iOS26, UISplitViewController UI issue
Our project using UISplitViewController as the root view controller for whole app. And when using the xocde26 to build app in iOS26, the layout of page is uncorrect. for iPhone, when launch app and in portrait mode, the app only show a blank page: and when rotate app to landscape, the first view controller of UISplitViewController's viewControllers will float on second view controller: and this float behavior also happens in iPad: below is the demo code: AppDelegate.swift: import UIKit @main class AppDelegate: UIResponder, UIApplicationDelegate { let window: UIWindow = UIWindow() func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { let vc = SplitViewController(primary: TabBarViewController(), secondary: ViewController()) window.rootViewController = vc window.makeKeyAndVisible() return true } } SplitViewController: import UIKit class SplitViewController: UISplitViewController { init(primary: UIViewController, secondary: UIViewController) { super.init(nibName: nil, bundle: nil) preferredDisplayMode = .oneBesideSecondary presentsWithGesture = false delegate = self viewControllers = [primary, secondary] } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() } } extension SplitViewController: UISplitViewControllerDelegate { } TabBarViewController.swift: import UIKit class FirstViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .red tabBarItem = UITabBarItem(title: "Home", image: UIImage(systemName: "house"), tag: 0) } } class SecondViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .purple tabBarItem = UITabBarItem(title: "Setting", image: UIImage(systemName: "gear"), tag: 1) } } class TabBarViewController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() let firstVC = FirstViewController() let secondVC = SecondViewController() tabBar.backgroundColor = .orange viewControllers = [firstVC, secondVC] } } ViewController.swift: import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .systemPink } } And I have post a feedback in Feedback Assistant(id: FB18004520), the demo project code can be found there.
1
1
203
Jun ’25
browser.runtime.onMessage in content script intermittently fails on iOS 18.5 (Safari Web Extensions)
Hi everyone, I’m encountering a critical reliability issue with message passing in my Safari Web Extension on iOS 18.4.1 and iOS 18.5. In my extension, I’m using the standard messaging API. The background script sends a message to the content script using browser.tabs.sendMessage(...), and the content script registers a listener via: browser.runtime.onMessage.addListener(handler); This setup has been working reliably in all prior versions of iOS. However, after updating to iOS 18.4.1 and 18.5, I’ve noticed the following behavior: ✅ The content script is successfully injected, and onMessage.addListener is registered (I see logging confirming this). ✅ The background script sends the message using the correct tabId (also confirmed via logs). ❌ The content script’s onMessage listener is not consistently triggered. ⚠️ This issue is intermittent, sometimes the message is received, sometimes it is silently dropped. ❌ No exceptions or errors are thrown in either script, the message appears to be sent, but not picked up from the content script message listener.
3
2
168
2w
How to replace layoutManager with textLayoutManager for a flexible dynamic height UITextView
In order to create a UITextView like that of the Messages app whose height grows to fits its contents (number of lines), I subclassed UITextView and customized the intrinsicContentSize like so: override var intrinsicContentSize: CGSize { var size = super.intrinsicContentSize if size.height == UIView.noIntrinsicMetric { layoutManager.glyphRange(for: textContainer) size.height = layoutManager.usedRect(for: textContainer).height + textContainerInset.top + textContainerInset.bottom } return size } As noted at WWDC, accessing layoutManager will force TextKit 1, we should instead use textLayoutManager. How can this code be migrated to support TextKit 2?
3
0
92
Jun ’25
Navigation Title no longer showing for first Tab in iOS/iPadOS 26
Navigation Title no longer showing for first Tab in iOS/iPadOS 26 (Directives) in my app Starship SE Corps when running is Xcode 26 simulator and on iPad device itself running iPadOS 26 beta. Launch app Notice Navigation Title “Directives” is missing from top tab in Sidebar and Floating Tab View (iPad) and TabView (iOS). Navigate to other tabs and Navigation Titles appear as expected. Worked fine (as expected) in iOS/iPadOS 18.5, but broken in iOS/iPadOS 26. Reference Feedback: FB17987650
6
1
135
1d
How to send PTT push for incomingServiceUpdatePush?
I was recently made aware of a relatively new method on PTChannelManagerDelegate that allows the backend infrastructure to update the PTT service on a device. incomingServiceUpdatePush(channelManager:channelUUID:pushPayload:isHighPriority:remainingHighPriorityBudget:completion:) I remember the person stated that there was a specific format that the payload must have, but I am unable to find any documentation about it. Can somebody point me to documentation on how to send this type of push notification for incomingServiceUpdatePush or give me an example payload? I believe it uses the same PTT push token, but if the headers are different, then please specify those differences too. Thanks!
3
1
77
Jun ’25
Losing connection to the debugger in Xcode when a new configuration is pushed through MDM.
I pushed a configuration to my iPhone through MDM to run the content filter. However, when I modify the configuration by adding some vendor-configuration , I lose connection to the debugger and can no longer see logs or the updated configuration in Xcode. I have to build the app again. Could this be an issue with Xcode, or is it related to MDM or the configuration itself?
2
0
70
Jun ’25
IOS 26 Beta, Unexpected Liquid Navigation Bar Blured the whole View
I use .scaleEffect(x: 1, y: -1, anchor: .center) to reverse the messages list, so that the latest message always at the bottom. This is correct in ios18, but blurred the whole view in ios26. Complete code: ScrollView { Rectangle() .fill(.clear) .frame(height: 10) // if messages.isEmpty { // MessagesEmpty() // .padding(.horizontal, 10) // .scaleEffect(x: 1, y: -1, anchor: .center) // } MessageInput(chat: chat) .padding(.horizontal, 10) .scaleEffect(x: 1, y: -1, anchor: .center).id("#messag-input-identifier") LazyVStack(spacing: 10) { ForEach(messages) { (message: Message) in MessageItem(message: message, activation: $activeMessageId, audioAdapter: AudioAdapter.shared).id(message.id) } .padding(.horizontal, 10) .scaleEffect(x: 1, y: -1, anchor: .center) } Rectangle() .fill(.clear) .frame(height: 20) } .scaleEffect(x: 1, y: -1, anchor: .center) As shown in the screenshot WechatIMG49.jpg(using ios26beta which is incorrect), WechatIMG50.jpg(using ios18 which is correct) my messages list displays normally on iOS 18, but when using iOS 26 Beta, the entire view is blurred. IOS 26 Beta(Error): IOS 18(Correct):
Topic: UI Frameworks SubTopic: SwiftUI Tags:
0
0
124
Jun ’25