Search results for

“swiftui”

17,109 results found

Post

Replies

Boosts

Views

Activity

Understanding SwiftUI toolbars
I have two apps written in SwiftUI. Both use a NavigationSplitView as their primary content with a list-based sidebar. Both apps have a few toolbar items offering functionality relevant to the application purpose. Both sidebars have toolbar items, declared using the .toolbar view modifier, that add ToolbarItems to their view (a filter menu). Both the apps' main content view use .toolbar to add some ToolbarItems to the main content toolbar as well. Both also include the SidebarCommands() command group. My question is this: in one app, when I click the Hide Sidebar button, the toolbar items that were attached to the sidebar move to the main toolbar. In my second app, the toolbar items move to the More disclosure menu at the end of the toolbar. Video showing sidebar leading Video showing sidebar trailing I want behavior like the first app (where the toolbar items end up in the leading edge of the main toolbar) in the second app, but I've scrubbed through both applications' toolbar code, I've had coding
Topic: UI Frameworks SubTopic: SwiftUI
4
0
157
Apr ’26
Live Activity works perfectly on Simulator but fails on physical device: "No asset provider bundle ID provided"
Hello community, I am implementing a Live Activity for my existing App Store app. The Live Activity works perfectly on the iOS Simulator, but it completely fails to appear on the physical device's lock screen. When I call Activity.request, it succeeds and returns a valid Activity ID, but the physical device's console immediately outputs the following errors from liveactivitiesd: liveactivitiesd is not entitled to specify a scene target. Defaulting containingProcess target to liveactivitiesd No asset provider bundle ID provided I have spent days debugging this and have tried every known workaround. Here is the comprehensive list of what I have already verified and attempted: Environment: Xcode: 16.4 iOS Device: iPhone 13 mini, iOS 26.3.1 macOS: Sequoia 15.6 What I have verified/tried (to avoid duplicate suggestions): NSSupportsLiveActivities: It is set to YES in the main app's Info.plist. I also tried adding it to the Widget Extension's Info.plist just in case. App Icons: The main app has a valid AppIcon set i
3
0
336
Apr ’26
Layout Bug: Button icon lags after keyboard dismissal in SwiftUI
Hello everyone, I am experiencing a layout issue in a SwiftUI project where an icon inside a button becomes laggy after the keyboard is dismissed. I have a custom input bar designed with an HStack containing a TextField and a Button with a microphone.fill icon. The entire HStack is styled using a .clipShape(.capsule) and a background color and I am using @FocusState to manage the keyboard focus. When the user taps the TextField, the keyboard appears, and the entire view moves up correctly to make room. But when the keyboard is dismissed by the button action isPromptFieldFocused = false, the capsule-shaped background and the text field return to their original position, but the icon on the button (and just the icon) doesn't. The microphone icon inside the button does not follow the movement. It remains stuck at the keyboard-up height for a moment until the view is refreshed, breaking the UI. And by the way, the icon correctly returns to its original position with the other UI elements if the user pres
0
0
194
Apr ’26
Reply to WKWebsiteDataStore.allDataStoreIdentifiers crashes
Attached the crash log, it reproducible by creating a new SwiftUI app and replace ContentView.swift with import SwiftUI import WebKit struct ContentView: View { var body: some View { VStack { Image(systemName: globe) .imageScale(.large) .foregroundStyle(.tint) Text(Hello, world!) } .padding() .task { @MainActor in _ = await WKWebsiteDataStore.allDataStoreIdentifiers } } } #Preview { ContentView() } WebDataStoreCrash.txt
Topic: Safari & Web SubTopic: General
Apr ’26
First-time notarization submissions stuck "In Progress" — two submissions, 15+ hours
This is my first time submitting an app for notarization. Both submissions have been stuck In Progress with no logs available. Body: This is my first time submitting an app for notarization. Both submissions have been stuck In Progress with no logs available. Submission 1: ID: 43ea68c1-5291-42c6-b0e1-3cacab4ca01a Submitted: 2026-04-09T02:05:34Z Status: In Progress (15+ hours) Submission 2: ID: 12ea49a0-64cf-495e-af7e-9aad5aabe30f Submitted: 2026-04-09T17:06:51Z Status: In Progress (1+ hour) Details: Team ID: PWTWN9N25D App: Native macOS SwiftUI app (arm64), ~84 MB zipped Signed with Developer ID Application certificate, Hardened Runtime enabled All embedded helper binaries individually codesigned with Hardened Runtime codesign --verify --deep --strict passes Submitted via xcrun notarytool submit with --keychain-profile notarytool log returns not yet available for both Apple System Status shows all services available
3
0
889
Apr ’26
Reply to My iOS Swift application works on wide range of iPhones from iPhone X to iPhone 16 Pro Max
This is a full crash report. So, the crash itself is a fairly standard watchdog crash, caused by blocking the main thread for too long. We have a full article on these issues here, though it doesn't specifically address SwiftUI issues. Finally, you mentioned it was happening when: ...when scrolling the screen. ...which is inline with what the log looks like. Unfortunately, there isn't a lot else to look at here as there isn't really anything else in the log. A few other questions: Do your other logs look broadly similar or are the outliers that look significantly different? Many of these issues are caused by complicated interactions between components, so it's possible one of those outlier logs will provide a critical clue to the underlying issue. Does the overall app state look normal? There's no other meaningful thread activity in the log you sent, which is fairly uncommon. It's possible that's normal for your app, but it could also mean that an earlier failure broke your app’s normal flow, which c
Apr ’26
Floating Card Window in iOS 26
My SwiftUI app runs as a floating card window on iOS 26 iPhone instead of full screen. UIRequiresFullScreen and UIApplicationSupportsMultipleScenes: false don't fix it. What's the iOS 26 Info.plist key or API to opt out of windowed mode? First iOS app, I'm very confused, and have been trying different things for like 3 days. Any nudge in the right direction would be wildly appreciated. Thanks! Mark
Topic: UI Frameworks SubTopic: SwiftUI
0
0
82
Apr ’26
Reply to Disabling font Anti-Aliasing in a Text in SwiftUI
Hi, I didn't see your reply... Sorry for the huge delay of this response, but I just found a solution and thought again about this post. Thanks for pointing me to Feedback Assistant — I've submitted a report, and the reference number is FB22423114. Here is the working solution I just less than an hour ago: applying a Metal shader to the view. Here's the code: Shader.metal #include using namespace metal; /// Discards pixels with alpha below the given threshold. /// Pixels above the threshold are kept as-is. [[ stitchable ]] half4 alphaThreshold(float2 position, half4 color, float threshold) { if (color.a < half(threshold)) { return half4(0.0); } return color; } Then apply it to a Text view in SwiftUI like this: Text(Hello) .colorEffect( ShaderLibrary.alphaThreshold(.float(1.0)) ) Thanks. Here's the result: And for the comparaison, here's what it looked like before the metal shader:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’26
DeviceActivityReport Extension not working on iOS 26.4 — Extension process never launches
Device: iPhone 15 Pro Max, iOS 26.4 Xcode: Latest version, development signing with Automatically manage signing Team: Registered Apple Developer Program (Organization) Problem DeviceActivityReport SwiftUI view renders completely blank. The Report Extension's makeConfiguration(representing:) is never called (confirmed via App Group counter that stays at 0). The DeviceActivityMonitorExtension callbacks (intervalDidStart, eventDidReachThreshold) also never fire. What works AuthorizationCenter.shared.requestAuthorization(for: .individual) → .approved DeviceActivityCenter().startMonitoring() → registers schedules successfully, center.activities returns them ManagedSettingsStore.shield.applications → blocks apps correctly from the main app process Screen Time is enabled and actively collecting data (Settings > Screen Time shows per-app usage: Clash Royale 2h 35m, etc.) App Group UserDefaults(suiteName:) read/write works from the main app What doesn't work DeviceActivityReportExtension.makeConfiguration
2
0
379
Apr ’26
My iOS Swift application works on wide range of iPhones from iPhone X to iPhone 16 Pro Max
My iOS Swift application works without problems and tested on wide range of iPhones from iPhone X to iPhone 16 Pro Max when compiled by XCode 16.4. When compiled on Xcode 26 application it frequently crashes with 0x8BADF00D FRONTBOARD error in various places when running on iPhone 14 Plus, most often when typing or when scrolling the screen. It works without problems on iPhone 16 Pro Max independent of the version of Xcode used for compilation. I followed dozens of recommendations, introduced async/await, tasks, significantly reduced complexity of layouts, making uniform bubbles etc.etc. , tried to introduce many simplifications in the application, still I could not achieve elimination of frequent crashes on iPhone 14 Plus running iOS 26.3.1, no matter what I tried. Other than that all functionality seems to be working. This is the beginning of the Crash report: Termination Reason: Namespace FRONTBOARD, >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1&
3
0
100
Apr ’26
How to add a button on top of sheet?
Hi, I have created this UI using custom view and not a real sheet component. But the animations and interaction is not as smooth. Earlier I was using sheet component and it was working very well, but then I had a need to add a search button on top of sheet (not inside, that is very important). And so I created this whole sheet with custom view and not the sheet component. But it resulted in loss of fluid working and animations that sheet have. Including changing between Medium detent and Large detent. Is it possible to achieve this UI with native sheet component? Or using some other native swiftui view which will have good animation that sheet has?
0
0
139
Apr ’26
Reply to iOS 26 TabBar Remove Selected Capsule
Thanks for the post. Any chance you can provide a simple focused project we can download and run it to see what you are seeing? If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project. What happens when you disable Liquid Glass? Do you get the results that you want? When you create a standard UIView (or SwiftUI View) that contains your custom buttons and layout and add custom view to the UITabBarController's view and anchor it to the bottom of the screen. When a user taps a button in your custom view, manually update the selected tab is when you get that result? Are you testing on iOS 26.4? What Xcode version are you using? Albert Pascual
  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’26
Interface Builder - Xcode 26.4 - Changing Between Attributes Inspector, File Inspector, Etc. Is Now A Pop Up Button?
In Interface Builder there use to be a segmented control to switch Inspectors. It's been this way forever. I could switch from: File Inspector Attributes Inspector Size Inspector Etc... Now in Xcode 26.4, it is this clunky pop up button? What? I thought Apple didn't like Interface Builder anymore so I'm surprised they are even touching it. This part of a SwiftUI rewrite or just bad vibes?
2
0
299
Apr ’26
Reply to iOS26的TabBar是否支持lottie动画?
It seems you are asking about Lottie animations in the system tab bar. The tab bar (TabView in SwiftUI / UITabBarController in UIKit) supports SF Symbols and animated symbol effects such as .bounce, .wiggle, .breathe etc.. The tab bar does not natively support Lottie animations. For more information, see What's new in SF Symbols 7  Travis
Topic: UI Frameworks SubTopic: UIKit
Apr ’26
Reply to Production Mac app becomes progressively unusable in Issues workspace; Mac_Dev remains fast
Here is more concrete context. Platform / tools Target: macOS app Language / frameworks: Swift, SwiftUI, SwiftData Cloud sync: SwiftData with CloudKit mirroring in the production configuration Xcode: 26.4 (17E192) Test OS: macOS 26.4 (25E246) What I’m seeing In the macOS app, issue board scrolling can become inconsistent or very slow. Changing an issue status from detail view can be very slow. Scrolling the status menu itself can be slow. Typing in issue description/notes fields can become sluggish. The problem is much more noticeable with my full production-sized dataset than with a small dev dataset. What I’ve tested so far I compared a small dev dataset vs a much larger production-sized dataset. With a small dataset, the same UI feels fast and smooth. With the large dataset, the same UI becomes noticeably slower. I also tested a local-only copy of the production dataset with CloudKit disabled. That improved some behavior, but it did not remove the lag entirely. When I reduced the local test datase
Topic: App & System Services SubTopic: iCloud Tags:
Apr ’26
Understanding SwiftUI toolbars
I have two apps written in SwiftUI. Both use a NavigationSplitView as their primary content with a list-based sidebar. Both apps have a few toolbar items offering functionality relevant to the application purpose. Both sidebars have toolbar items, declared using the .toolbar view modifier, that add ToolbarItems to their view (a filter menu). Both the apps' main content view use .toolbar to add some ToolbarItems to the main content toolbar as well. Both also include the SidebarCommands() command group. My question is this: in one app, when I click the Hide Sidebar button, the toolbar items that were attached to the sidebar move to the main toolbar. In my second app, the toolbar items move to the More disclosure menu at the end of the toolbar. Video showing sidebar leading Video showing sidebar trailing I want behavior like the first app (where the toolbar items end up in the leading edge of the main toolbar) in the second app, but I've scrubbed through both applications' toolbar code, I've had coding
Topic: UI Frameworks SubTopic: SwiftUI
Replies
4
Boosts
0
Views
157
Activity
Apr ’26
Live Activity works perfectly on Simulator but fails on physical device: "No asset provider bundle ID provided"
Hello community, I am implementing a Live Activity for my existing App Store app. The Live Activity works perfectly on the iOS Simulator, but it completely fails to appear on the physical device's lock screen. When I call Activity.request, it succeeds and returns a valid Activity ID, but the physical device's console immediately outputs the following errors from liveactivitiesd: liveactivitiesd is not entitled to specify a scene target. Defaulting containingProcess target to liveactivitiesd No asset provider bundle ID provided I have spent days debugging this and have tried every known workaround. Here is the comprehensive list of what I have already verified and attempted: Environment: Xcode: 16.4 iOS Device: iPhone 13 mini, iOS 26.3.1 macOS: Sequoia 15.6 What I have verified/tried (to avoid duplicate suggestions): NSSupportsLiveActivities: It is set to YES in the main app's Info.plist. I also tried adding it to the Widget Extension's Info.plist just in case. App Icons: The main app has a valid AppIcon set i
Replies
3
Boosts
0
Views
336
Activity
Apr ’26
Layout Bug: Button icon lags after keyboard dismissal in SwiftUI
Hello everyone, I am experiencing a layout issue in a SwiftUI project where an icon inside a button becomes laggy after the keyboard is dismissed. I have a custom input bar designed with an HStack containing a TextField and a Button with a microphone.fill icon. The entire HStack is styled using a .clipShape(.capsule) and a background color and I am using @FocusState to manage the keyboard focus. When the user taps the TextField, the keyboard appears, and the entire view moves up correctly to make room. But when the keyboard is dismissed by the button action isPromptFieldFocused = false, the capsule-shaped background and the text field return to their original position, but the icon on the button (and just the icon) doesn't. The microphone icon inside the button does not follow the movement. It remains stuck at the keyboard-up height for a moment until the view is refreshed, breaking the UI. And by the way, the icon correctly returns to its original position with the other UI elements if the user pres
Replies
0
Boosts
0
Views
194
Activity
Apr ’26
Reply to WKWebsiteDataStore.allDataStoreIdentifiers crashes
Attached the crash log, it reproducible by creating a new SwiftUI app and replace ContentView.swift with import SwiftUI import WebKit struct ContentView: View { var body: some View { VStack { Image(systemName: globe) .imageScale(.large) .foregroundStyle(.tint) Text(Hello, world!) } .padding() .task { @MainActor in _ = await WKWebsiteDataStore.allDataStoreIdentifiers } } } #Preview { ContentView() } WebDataStoreCrash.txt
Topic: Safari & Web SubTopic: General
Replies
Boosts
Views
Activity
Apr ’26
First-time notarization submissions stuck "In Progress" — two submissions, 15+ hours
This is my first time submitting an app for notarization. Both submissions have been stuck In Progress with no logs available. Body: This is my first time submitting an app for notarization. Both submissions have been stuck In Progress with no logs available. Submission 1: ID: 43ea68c1-5291-42c6-b0e1-3cacab4ca01a Submitted: 2026-04-09T02:05:34Z Status: In Progress (15+ hours) Submission 2: ID: 12ea49a0-64cf-495e-af7e-9aad5aabe30f Submitted: 2026-04-09T17:06:51Z Status: In Progress (1+ hour) Details: Team ID: PWTWN9N25D App: Native macOS SwiftUI app (arm64), ~84 MB zipped Signed with Developer ID Application certificate, Hardened Runtime enabled All embedded helper binaries individually codesigned with Hardened Runtime codesign --verify --deep --strict passes Submitted via xcrun notarytool submit with --keychain-profile notarytool log returns not yet available for both Apple System Status shows all services available
Replies
3
Boosts
0
Views
889
Activity
Apr ’26
Reply to My iOS Swift application works on wide range of iPhones from iPhone X to iPhone 16 Pro Max
This is a full crash report. So, the crash itself is a fairly standard watchdog crash, caused by blocking the main thread for too long. We have a full article on these issues here, though it doesn't specifically address SwiftUI issues. Finally, you mentioned it was happening when: ...when scrolling the screen. ...which is inline with what the log looks like. Unfortunately, there isn't a lot else to look at here as there isn't really anything else in the log. A few other questions: Do your other logs look broadly similar or are the outliers that look significantly different? Many of these issues are caused by complicated interactions between components, so it's possible one of those outlier logs will provide a critical clue to the underlying issue. Does the overall app state look normal? There's no other meaningful thread activity in the log you sent, which is fairly uncommon. It's possible that's normal for your app, but it could also mean that an earlier failure broke your app’s normal flow, which c
Replies
Boosts
Views
Activity
Apr ’26
Floating Card Window in iOS 26
My SwiftUI app runs as a floating card window on iOS 26 iPhone instead of full screen. UIRequiresFullScreen and UIApplicationSupportsMultipleScenes: false don't fix it. What's the iOS 26 Info.plist key or API to opt out of windowed mode? First iOS app, I'm very confused, and have been trying different things for like 3 days. Any nudge in the right direction would be wildly appreciated. Thanks! Mark
Topic: UI Frameworks SubTopic: SwiftUI
Replies
0
Boosts
0
Views
82
Activity
Apr ’26
Reply to Disabling font Anti-Aliasing in a Text in SwiftUI
Hi, I didn't see your reply... Sorry for the huge delay of this response, but I just found a solution and thought again about this post. Thanks for pointing me to Feedback Assistant — I've submitted a report, and the reference number is FB22423114. Here is the working solution I just less than an hour ago: applying a Metal shader to the view. Here's the code: Shader.metal #include using namespace metal; /// Discards pixels with alpha below the given threshold. /// Pixels above the threshold are kept as-is. [[ stitchable ]] half4 alphaThreshold(float2 position, half4 color, float threshold) { if (color.a < half(threshold)) { return half4(0.0); } return color; } Then apply it to a Text view in SwiftUI like this: Text(Hello) .colorEffect( ShaderLibrary.alphaThreshold(.float(1.0)) ) Thanks. Here's the result: And for the comparaison, here's what it looked like before the metal shader:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’26
DeviceActivityReport Extension not working on iOS 26.4 — Extension process never launches
Device: iPhone 15 Pro Max, iOS 26.4 Xcode: Latest version, development signing with Automatically manage signing Team: Registered Apple Developer Program (Organization) Problem DeviceActivityReport SwiftUI view renders completely blank. The Report Extension's makeConfiguration(representing:) is never called (confirmed via App Group counter that stays at 0). The DeviceActivityMonitorExtension callbacks (intervalDidStart, eventDidReachThreshold) also never fire. What works AuthorizationCenter.shared.requestAuthorization(for: .individual) → .approved DeviceActivityCenter().startMonitoring() → registers schedules successfully, center.activities returns them ManagedSettingsStore.shield.applications → blocks apps correctly from the main app process Screen Time is enabled and actively collecting data (Settings > Screen Time shows per-app usage: Clash Royale 2h 35m, etc.) App Group UserDefaults(suiteName:) read/write works from the main app What doesn't work DeviceActivityReportExtension.makeConfiguration
Replies
2
Boosts
0
Views
379
Activity
Apr ’26
My iOS Swift application works on wide range of iPhones from iPhone X to iPhone 16 Pro Max
My iOS Swift application works without problems and tested on wide range of iPhones from iPhone X to iPhone 16 Pro Max when compiled by XCode 16.4. When compiled on Xcode 26 application it frequently crashes with 0x8BADF00D FRONTBOARD error in various places when running on iPhone 14 Plus, most often when typing or when scrolling the screen. It works without problems on iPhone 16 Pro Max independent of the version of Xcode used for compilation. I followed dozens of recommendations, introduced async/await, tasks, significantly reduced complexity of layouts, making uniform bubbles etc.etc. , tried to introduce many simplifications in the application, still I could not achieve elimination of frequent crashes on iPhone 14 Plus running iOS 26.3.1, no matter what I tried. Other than that all functionality seems to be working. This is the beginning of the Crash report: Termination Reason: Namespace FRONTBOARD, >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1&
Replies
3
Boosts
0
Views
100
Activity
Apr ’26
How to add a button on top of sheet?
Hi, I have created this UI using custom view and not a real sheet component. But the animations and interaction is not as smooth. Earlier I was using sheet component and it was working very well, but then I had a need to add a search button on top of sheet (not inside, that is very important). And so I created this whole sheet with custom view and not the sheet component. But it resulted in loss of fluid working and animations that sheet have. Including changing between Medium detent and Large detent. Is it possible to achieve this UI with native sheet component? Or using some other native swiftui view which will have good animation that sheet has?
Replies
0
Boosts
0
Views
139
Activity
Apr ’26
Reply to iOS 26 TabBar Remove Selected Capsule
Thanks for the post. Any chance you can provide a simple focused project we can download and run it to see what you are seeing? If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project. What happens when you disable Liquid Glass? Do you get the results that you want? When you create a standard UIView (or SwiftUI View) that contains your custom buttons and layout and add custom view to the UITabBarController's view and anchor it to the bottom of the screen. When a user taps a button in your custom view, manually update the selected tab is when you get that result? Are you testing on iOS 26.4? What Xcode version are you using? Albert Pascual
  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Apr ’26
Interface Builder - Xcode 26.4 - Changing Between Attributes Inspector, File Inspector, Etc. Is Now A Pop Up Button?
In Interface Builder there use to be a segmented control to switch Inspectors. It's been this way forever. I could switch from: File Inspector Attributes Inspector Size Inspector Etc... Now in Xcode 26.4, it is this clunky pop up button? What? I thought Apple didn't like Interface Builder anymore so I'm surprised they are even touching it. This part of a SwiftUI rewrite or just bad vibes?
Replies
2
Boosts
0
Views
299
Activity
Apr ’26
Reply to iOS26的TabBar是否支持lottie动画?
It seems you are asking about Lottie animations in the system tab bar. The tab bar (TabView in SwiftUI / UITabBarController in UIKit) supports SF Symbols and animated symbol effects such as .bounce, .wiggle, .breathe etc.. The tab bar does not natively support Lottie animations. For more information, see What's new in SF Symbols 7  Travis
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Apr ’26
Reply to Production Mac app becomes progressively unusable in Issues workspace; Mac_Dev remains fast
Here is more concrete context. Platform / tools Target: macOS app Language / frameworks: Swift, SwiftUI, SwiftData Cloud sync: SwiftData with CloudKit mirroring in the production configuration Xcode: 26.4 (17E192) Test OS: macOS 26.4 (25E246) What I’m seeing In the macOS app, issue board scrolling can become inconsistent or very slow. Changing an issue status from detail view can be very slow. Scrolling the status menu itself can be slow. Typing in issue description/notes fields can become sluggish. The problem is much more noticeable with my full production-sized dataset than with a small dev dataset. What I’ve tested so far I compared a small dev dataset vs a much larger production-sized dataset. With a small dataset, the same UI feels fast and smooth. With the large dataset, the same UI becomes noticeably slower. I also tested a local-only copy of the production dataset with CloudKit disabled. That improved some behavior, but it did not remove the lag entirely. When I reduced the local test datase
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Apr ’26