Apps crash on launch when using View.navigationLinkIndicatorVisibility(_:) (which is iOS 17.0+ iPadOS 17.0+ Mac Catalyst 17.0+). Catalyst also crashes. Stack trace starts with: Symbol not found: _$s7SwiftUI17EnvironmentValuesV33_navigationIndicatorVisibilityABIAA0G0OvpMV Xcode 26.0.1 (17A400) iPadOS 18.3.1 (22D8075) It also crashed a user on iOS 18.6.2 macOS 15.6.1 (24G90) FB20596543 import SwiftUI @main struct NavLinkDisabledApp: App { var body: some Scene { WindowGroup { NavigationStack { List { NavigationLink(Text) {} .navigationLinkIndicatorVisibility(.hidden) } } } } }
Search results for
swiftui
16,623 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Summary When a SwiftUI widget uses a Link containing an Image modified with .widgetAccentedRenderingMode (using any mode except .fullColor), tapping the image on the widget launches the app but does not pass the expected deep link URL to the SceneDelegate. Steps to Reproduce Create a SwiftUI Widget View with a Link: struct ImageView: View { var image: UIImage var body: some View { Link(URL(string: myapp://image)!) { Image(uiImage: image) .resizable() .widgetAccentedRenderingMode(.accentedDesaturated) // or any mode other than .fullColor .scaledToFill() .clipped() } } } Add Custom URL Scheme in Info.plist: CFBundleURLName com.company.myapp CFBundleURLSchemes myapp Implement Deep Link Handling in SceneDelegate: func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { if let url = connectionOptions.urlContexts.first?.url { handle(url) } } func scene(_ scene: UIScene, openURLContexts urlContexts: Set) { if let url = urlContex
I installed iOS 26.1 Beta 4, hoping the SpriteKit issues were fixed. But alas, they're still there. You can try this additional test: on any SpriteKit scene with a running animation, place a SwiftUI Menu on top. Each time the menu is opened, SpriteKit drops frames. This makes SwiftUI unusable alongside SpriteKit when the scene is animated or live-recorded. SpriteKit used to run predictably and efficiently. iOS 26 has broken too much in terms of performance and usability. The current state of things isn’t reassuring at all.
Topic:
Graphics & Games
SubTopic:
SpriteKit
Tags:
Hi, so here's my situation: I am currently building an app of which I want to have an Apple Watch standalone version / companion (idk yet, also doesn't matter). For it to be compatible with basically every Watch except for the original (Series 0) I want support for down to watchOS 6, as many models ended there. I also don't need the newest features for basic functionality and I can still add more for newer versions while keeping the basic functionality for watchOS 6, so that is not a concern, I'd rather have the compatibility. However, watchOS 6 is the last version to require the Storyboard architecture with an app bundle and extension target. I did some research and found out that you can create that and set the development target to 6.0 while also having a SwiftUI target with a development target of 7.0. That would have the benefit of being able to use SwiftUI for modern features to give a nice experience while building a basic but functional version for 6.0 in Storyboard architecture. And
I have a watchOS app with a connected iOS app using Swift and SwiftUI. The watchOS app should read heart rate date in the background using HKOberserQuery and enableBackgroundDelivery(), send the data to the iPhone app via WCSession. The iPhone app then sends the data to a Firebase project. The issue I am facing now it that the app with the HKObserverQuery works fine when the app is in the foreground, but when the app runs in the background, the observer query gets triggered for the first time (after one hour), but then always get terminated from the watchdog timeout with the following error message: CSLHandleBackgroundHealthKitQueryAction scene-create watchdog transgression: app:14451 exhausted real (wall clock) time allowance of 15.00 seconds I am using Xcode 16.3 on MacOS 15.4 The App is running on iOS 18.4 and watchOS 11.4 What is the reason for this this issue? I only do a simple SampleQuery to fetch the latest heart rate data inside the HKObserverQuery and then call the completionHandler. The qu
Hi Community! I'm wrangling with this for a few days now and can't find a way to fix it, but I see it working in other apps. I have a regular UIToolbar with buttons, assigning it as inputAccessoryView to a UITextView, so the toolbar appears above the keyboard (I can reproduce this also in SwiftUI). The toolbar contains regular UIBarButtonItems, except one doesn't have an action, it has a UIMenu (using .menu = UIMenu...). In the Apple Notes app, there is also one button that shows a menu like that. When you tap on the button, the toolbar disappears and the menu shows directly above the keyboard. However, in my code it shows above the hidden toolbar, means there is a huge gap between keyboard and menu. It works if I attach the toolbar (in SwiftUI) to the navigation at the top or bottom, just with the keyboard it behaves differently. Here is some sample code for the toolbar: private lazy var accessoryToolbar: UIToolbar = { let toolbar = UIToolbar() let bold = UIBarButtonItem(image: UIImage(syst
Overview Starting with macOS 26 beta 1, a new NSGlassContainerView is added inside NSToolbarView. This view intercepts mouse events, so any SwiftUI Button (or other interactive view) overlaid on the title‑bar / toolbar area no longer receives clicks. (The same code works fine on macOS 15 and earlier.) Filed as FB18201935 via Feedback Assistant. Reproduction (minimal project) macOS 15 or earlier → button is clickable macOS 26 beta → button cannot be clicked (no highlight, no action call) @main struct Test_macOS26App: App { init() { // Uncomment to work around the issue (see next section) // enableToolbarClickThrough() } var body: some Scene { WindowGroup { ContentView() } .windowStyle(.hiddenTitleBar) // ⭐️ hide the title bar } } struct ContentView: View { var body: some View { NavigationSplitView { List { Text(sidebar) } } detail: { HSplitView { listWithOverlay listWithOverlay } } } private var listWithOverlay: some View { List(0..<30) { Text(item: ($0)) } .overlay(alignment: .topTrailing) { // ⭐️
Update after StackOverflow suggestion that did not resolve the issue: import SwiftUI @Observable class RootViewController: CustomStringConvertible { var description: String { return switch(currentView) { case .home: Home case .formView: Form View } } enum Views { case home case formView } public var currentView: Views = .home // This prevents the toolbar from displaying. Change to .formView, and it works. } struct ContentView: View { @State private var rootViewController = RootViewController() var body: some View { switch rootViewController.currentView { case .formView: FormView() case .home: HomeView() .environment(rootViewController) } } } struct FormView: View { @State private var text: String = @FocusState private var isInputActive: Bool var body: some View { NavigationStack { Form { TextField(Text, text: $text) .keyboardType(.decimalPad) .focused($isInputActive) Text(Text: (text)) } .navigationTitle(Keyboard Toolbar Test) .toolbar { ToolbarItemGroup(placement: .keyboard) { Spacer() Button(Close
Topic:
UI Frameworks
SubTopic:
SwiftUI
I'm trying to display a toolbar with a done button on the keyboard. It works in isolation, but within the context of the app, the toolbar doesn't display. The app has Home Screen View with buttons for navigation to other Views within the app, and a controller to keep track of the current view. Each section of the app has its own Navigation Stack. If I skip the main menu, the keyboard toolbar displays, but if I go through the main menu view first, it doesn't. This seems like a bug in SwiftUI to me, but maybe there's something else going on that I'm missing. Any help is appreciated. Here's an extremely simplified example: import SwiftUI @Observable class RootViewController: CustomStringConvertible { var description: String { return switch(currentView) { case .home: Home case .formView: Form View } } enum Views { case home case formView } public var currentView: Views = .home // This prevents the toolbar from displaying. Change to .formView, and it works. } struct ContentView: View { @State pri
Topic:
UI Frameworks
SubTopic:
SwiftUI
I have an app that streams in data from the Foundation Model and I have a card that shows one of the outputs. I want my card to accept a partially generated model but I keep getting a nonsensical error. The error I get on line 59 is: Cannot convert value of type 'FrostDate.VegetableSuggestion.PartiallyGenerated' (aka 'FrostDate.VegetableSuggestion') to expected argument type 'FrostDate.VegetableSuggestion.PartiallyGenerated' Here is my card with preview: import SwiftUI import FoundationModels struct VegetableSuggestionCard: View { let vegetableSuggestion: VegetableSuggestion.PartiallyGenerated init(vegetableSuggestion: VegetableSuggestion.PartiallyGenerated) { self.vegetableSuggestion = vegetableSuggestion } var body: some View { VStack(alignment: .leading, spacing: 8) { if let name = vegetableSuggestion.vegetableName { Text(name) .font(.headline) .frame(maxWidth: .infinity, alignment: .leading) } if let startIndoors = vegetableSuggestion.startSeedsIndoors { Text(Start indoors: (startIndoors)) .frame
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
Hello. Is there a good SwiftUI approach on getting the TextEditor cursor position? I have a TextEditor and sometimes when we have a longer text inside it, the cursor is not seen because the keyboard is above covering the bottom of the TextEditor. I would like to somehow detect the position of the cursor, and if it's on the last line of the TextEditor, scroll to the bottom. I've already checked a bit and didn't find any good method of doing this in SwiftUI. If you have any ideas on how to do this, or even a different method any help would be highly appreciated. Thank you!
/Users/rich/Work/IdeaBlitz/IdeaBlitz/IdeaListView.swift:30:25 The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions Is it just me? I get this on syntax errors, missing commas, missing quotes, and for no particular reason at all that I can see. I don't think I've been able to write a single, simple, SwiftUI view without seeing this multiple times. Breaking it up just makes it harder to read. Simple, inline, 2-page views become 8-page, totally unreadable, monstrosities. Am I doing something wrong? Or is this just the state of SwiftUI today? Or is there some way to tell the compiler to take more time on this expression? I mean, if these can be broken up automatically, then why doesn't the compiler to that already?
Hello everyone, I am migrating a legacy KEXT to a DriverKit (DEXT) architecture. While the DEXT itself is working correctly, I am completely blocked by a code signing issue when trying to establish the UserClient connection from our SwiftUI management app. Project Goal & Status: Our DEXT (com.accusys.Acxxx.driver) activates successfully (systemextensionsctl list confirms [activated enabled]). The core functionality is working (diskutil list shows the corresponding disk device node). The Core Problem: The userclient-access Signing Error To allow the app to connect to the DEXT, the com.apple.developer.driverkit.userclient-access entitlement is required in the app's .entitlements file. However, as soon as this entitlement is added, the build fails. Both automatic and manual signing fail with the same error: `Provisioning profile ... doesn't match the entitlements file's value for the ... userclient-access entitlement.` This build failure prevents the generation of an .app bundle, making it impossibl
If i type in a textfield while a popover is animating its close animation the text entered will not show until popover is closed. Making it look like the applications is lagging. This is using SwiftUI on MacOS.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Hi, I have been working through some of the SwiftUI tutorials (I really like it so far). Today I was editing a source file and I decided to widen the window a bit. I dragged too far to the right and wound up hiding the Preview. I cannot find any menu item, preference, etc. that allows you to show/hide the Preview. I'd like to get it back but have no idea how. I tried deleting some Xcode preferences but that did not help. I appreciate any advice. This is for Xcode 12.1.