Search results for

swiftui

16,623 results found

Post

Replies

Boosts

Views

Activity

Reply to Weird behavior with ContentUnavailableView
Thank you for the post. I noticed that you have posted the same issue again, this time with a link to the code. My recommendation, if I may, is to create a focused and simple project based on ContentUnavailableView https://developer.apple.com/documentation/swiftui/contentunavailableview. This project should demonstrate the exact behavior on iOS 26 and include a link to the code. This approach will make it easier to file a bug based on the project. 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. Once you open the bug report, please post the FB number here for my reference. If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why? Hope all this helps. Please let me know when is filed for me to check. Resources: https://developer.apple.com/documentation/TechnologyOverviews/adopting-liquid-glass Albert Pascual
  Worldwide
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’25
Reply to UIBarButtonItem alignment in UIToolbar on iOS 26 in UIDesignRequiresCompatibility mode
Thank you for your post. It appears that you are developing a UIToolbar in Objective-C. How did you attempt to utilize SwiftUI or Storyboards? In Objective-C, the UIBarButtonItem appears to render sequentially without constraints. You may need to incorporate constraints in code as well. However, I concur that the new version should not differ from the previous one. Have you attempted to use it in the latest beta of iOS? Do you observe any discrepancies? Could you kindly provide a concise focused sample that illustrates the problem? 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. Albert Pascual
  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’25
Setting immerstionStyle while in immersive space breaks all entities.
I have my immersive space set up like: ImmersiveSpace(id: Theater) { ImmersiveTeleopView() .environment(appModel) .onAppear() { appModel.immersiveSpaceState = .open } .onDisappear { appModel.immersiveSpaceState = .closed } } .immersionStyle(selection: .constant(appModel.immersionStyle.style), in: .mixed, .full) Which allows me to set the immersive style while in the space (from a Picker on a SwiftUI window). The scene responds correctly but a lot of the functionality of my immersive space is gone after the change in style; in that I am no longer able to enable/disable entities (which I also have a toggles for in the SwiftUI window). I have to exit and reenter the immersive space to regain the ability to change the enabled state of my entities. My appModel.immersionStyle is inspired by the Compositor-Services demo (although I am using a RealityView) listed in https://developer.apple.com/documentation/CompositorServices/interacting-with-virtual-content-blended-with-passthrough and looks like t
1
0
226
Oct ’25
in OS26, X Large circle uses small circle size for the maximum image sizes
Create a static widget kit based widget for watchKit. Use swiftUI and an image. IE on 42mm you can import a 141x141 image at 2x. Import a 141x141 image in the widget and load it in swiftUI. In watchOS 11.x simulator the image will allow up to the size for X Large circles, and on os26, it will not load and complain the image is too large and report the area for the smaller circle, IE 89x89 @ 2x for 41mm Also submitted a feedback ticket FB20506200 This is a big issue b/c the size difference for X large circles v the smaller circles is really large. To get existing images to load I am having to resize them down 75-80% on OS26 in the X Large complication.
1
0
85
Oct ’25
SwiftUI macOS Preview Crash When Using Custom Row Directly Inside List
I’ve hit a strange SwiftUI preview crash that happens on macOS previews when using a view inside a List’s ForEach, resulting in the error Fatal Error in TableViewListCore_Mac2.swift. Only crashes macOS preview - iPhone/iPad preview doesn't crash. Doesn't crash when actually running the app. Here’s a minimal reproducible example, causing the preview to crash. XCode: Version 26.0.1 (17A400) MacOS: 26.0.1 (25A362) import SwiftUI struct Item: Identifiable { let id = UUID() let name: String } struct ItemRow: View { let item: Item var body: some View { HStack { Button(action: {}) { Image(systemName: play) } Text(item.name) Spacer() ProgressView() } } } struct ContentView: View { @State private var items = [ Item(name: Item A), Item(name: Item B), ] var body: some View { List { ForEach(items) { item in ItemRow(item: item) } } } } #Preview(Content view) { ContentView() } #Preview(Item row) { ItemRow(item: Item(name: Item A)) } If I wrap the row in a container, like this: ForEach(items) { item in ZSt
1
0
136
Oct ’25
Xcode 26 RC unable to compile asset catalogs on CI
This started with Xcode 26 beta 7, however it has continued to occur with the release candidate. Whenever I try to compile our asset catalog + icon composer icon for our AppKit/SwiftUI-based macOS app, actool fails with the following exception: *** Terminating app due to uncaught exception 'IBPlatformToolFailureException', reason: 'The tool closed the connection (AssetCatalogAgent-AssetRuntime) Last command: _ON_QUEUE_sendMessage:toChannelReturningError:during: Backtrace of last command: 0 -[IBAbstractPlatformToolProxy _ON_QUEUE_sendMessage:toChannelReturningError:during:] (in IDEInterfaceBuilderKit) 1 __74-[IBAbstractPlatformToolProxy sendMessage:toChannelReturningError:during:]_block_invoke (in IDEInterfaceBuilderKit) 2 _dispatch_client_callout (in libdispatch.dylib) 3 _dispatch_lane_barrier_sync_invoke_and_complete (in libdispatch.dylib) 4 DVTDispatchSync (in DVTFoundation) 5 -[IBAbstractPlatformToolProxy sendMessage:toChannelReturningError:during:] (in IDEInterfaceBuilderKit) 6 -[AssetCatalogRemo
4
0
342
Oct ’25
javaScriptCanOpenWindowsAutomatically Configuration in iOS 26 WebView
Hello, I'm exploring the new SwiftUI WebView and WebPage APIs introduced in iOS 26, and I have a question about configuring JavaScript window opening behavior. In our app, we currently use WKWebView with the javaScriptCanOpenWindowsAutomatically property set to true to support a specific use case. This property is part of WKPreferences and controls whether JavaScript can open windows without user interaction. According to the official documentation (WKPreferences.javaScriptCanOpenWindowsAutomatically), this property defaults to false on iOS and true on macOS. With the new iOS 26 WebView and WebPage APIs, I haven't been able to find a way to configure this behavior. Looking through the available configuration options, there doesn't appear to be an equivalent setting. My questions are: Has the default behavior changed for the new SwiftUI WebView? Does it now allow JavaScript to open windows automatically by default on iOS? If not, is there a way to configure this behavior that I'm missing? If
1
0
167
Oct ’25
mediaTypesRequiringUserActionForPlayback Configuration in iOS 26 WebView
Hello, I'm exploring the new SwiftUI WebView and WebPage APIs introduced in iOS 26, and I have a question about configuring media playback behavior. In our app, we currently use WKWebView with the mediaTypesRequiringUserActionForPlayback property set to [] (or WKAudiovisualMediaTypeNone) to allow HTML videos with an autoplay attribute to play automatically without requiring user interaction. This property is part of WKWebViewConfiguration and controls which media types require a user gesture to begin playing. According to the official documentation (WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback), this allows us to support video content that needs to autoplay for our specific use case. With the new iOS 26 WebView and WebPage APIs, I haven't been able to find a way to configure this behavior. Looking through the available configuration options, there doesn't appear to be an equivalent setting. My questions are: Has the default behavior changed for the new SwiftUI WebView? Doe
1
0
157
Oct ’25
Reply to mediaTypesRequiringUserActionForPlayback Configuration in iOS 26 WebView
If you'd like us to consider adding this functionality to the SwiftUI WebView, please file an enhancement request using the Feedback Assistant. If you file the request, please post the Feedback number here so we can make sure it gets routed to the right team. If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’25
Reply to Combine not working in background tasks on watchOS 26
Which BackgroundTask type are you using? The SwiftUI BackgroundTask API actually works by aggregating the behavior of a number of unrelated APIs, only some of which are public or fully supported on watchOS. That makes it very difficult to talk about it in a generic way. *It doesn't help that we've used the term background task for two OTHER APIs (UIApplication.beginBackgroundTask() and the BackgroundTask framework), both of which are significantly older than the SwiftUI API. __ Kevin Elliott DTS Engineer, CoreOS/Hardware
Oct ’25