Search results for

“swiftui”

17,488 results found

Post

Replies

Boosts

Views

Activity

Reply to Using isActivityFullscreen to build applications in xcode 16 will crash in ios 17
I encountered the same situation, but the version is Xcode 27 Beta 6, and the device is iOS 17. The minimal reproducible code is as follows: import SwiftUI import WidgetKit @main struct Xcode27LACrashApp: App { @Environment(.isActivityFullscreen) private var isActivityFullscreen var body: some Scene { WindowGroup { Text(isActivityFullscreen ? fullscreen : not fullscreen) } } } Crash info: dyld[712]: Symbol not found: _$s7SwiftUI17EnvironmentValuesV9WidgetKitE20isActivityFullscreenSbvg Referenced from: <6C188284-51F7-38B5-833C-13FDC11E4C2C> /private/var/containers/Bundle/Application/71A82AE6-495A-45AA-B823-A2E2597D6F6E/Xcode27LACrash.app/Xcode27LACrash.debug.dylib Expected in: <064E500D-3AE0-34EC-9759-52B592E7B15A> /System/Library/Frameworks/WidgetKit.framework/WidgetKit FB24532892
2h
Reply to String catalog for app target and widget target and common code
@Developer Tools Engineer wow this is so cool! Thank you so much for your guidance!! As per Use generated localizable symbols in your code The following works: Create a String Catalog file called Common.xcstrings Edit Common.xcstrings to add a symbol dog (This should be a symbol and not a string, by default it was creating as a symbol) Now in SwiftUI it can be used as Text(.Common.dog) It's really cool that these static properties are created automatically.
3h
Reply to SwiftUI, iOS 26.2, ToolbarItem .largeTitle and .title, overlap issue
Filed as FB24528594 with a minimal single-file repro. One finding worth adding to this thread: the collapsed-bar breakage doesn't need the .title item at all. With .inlineLarge and only a custom ToolbarItem(placement: .largeTitle), every scroll collapse leaves the collapsed bar with no title, no bar material or edge treatment, and content drawing through the status bar; it recovers on re-expansion. A .largeSubtitle item alone doesn't trigger it, and adding one to the .largeTitle item breaks the same way with the subtitle content vanishing too. Reproduced 100% on the iOS 26.5 simulator (Xcode 26.6), light and dark. No workaround found; navigationItem.titleView doesn't hold because SwiftUI re-renders the compact title after toolbar churn.
Topic: UI Frameworks SubTopic: SwiftUI
7h
.presentationPlacement(.leading) does not work!
When I try to apply .presentationPlacement(), I get this error: dyld[7938]: Symbol not found: _$s7SwiftUI21PresentationPlacementV7leadingACvgZ Referenced from: /private/var/containers/Bundle/Application/101B4DDE-56D9-4742-AABB-AE11E2415145/ShopperTransit2026.app/ShopperTransit2026.debug.dylib Expected in: <1FA062F0-69E6-3C8A-962D-F3DEF020CB94> /System/Library/Frameworks/SwiftUI.framework/SwiftUI Even having the method show up when using an extension View {}, it still causes this problem I'm not sure exactly why this is caused. Guessing from the missing symbol error, that Xcode does not have this symbol in the code. However, this line of code does work in #Preview {}. So I am completely unsure as to why it doesn't work on regular hardware. Does anyone have a clue why?
2
0
33
19h
SwiftUI List swipeActions stutter with variable row heights on ProMotion
I have isolated a reproducible animation issue involving SwiftUI List, system .swipeActions, variable row heights, and ProMotion. Environment: iPhone 17 Pro Max iOS 26.6 Xcode 26.5 Low Power Mode off “Limit Frame Rate” off iOS screen recording off When a List contains alternating single-line and two-line rows whose heights are determined naturally, slowly dragging a row left to reveal .swipeActions causes a visible pause. The row briefly stops following the finger, then jumps left. The trailing action buttons appear suddenly instead of being progressively revealed. Fast swipes are usually smooth. I created a minimal project with two modes: Variable: alternating single-line and two-line rows use their natural heights. Uniform: the same contents are constrained to a uniform height. Both modes use the same List, SF Symbol, tap gesture, and .swipeActions. The issue reproduces consistently in Variable mode, while Uniform mode remains smooth. A simplified version of the Row is: ForEach(0..<20, id: .self
0
0
198
1d
UIKit AppIntentSceneDelegate: connectionOptions.appIntent is nil on cold launch (iOS Beta) -
Hi everyone, I am currently implementing the new Search API in a UIKit app using @AppIntent(schema: .system.search), ShowInAppSearchResultsIntent, and UISceneAppIntent. While testing on the iOS beta, I’ve hit a significant lifecycle disparity between how UIKit and SwiftUI apps process system intents during a process-cold launch. According to the documentation for UIScene.ConnectionOptions.appIntent, this property should contain the intent that triggered the scene creation. However, in a UIKit app with a single-window scene lifecycle, this isn't happening consistently. Here is the behaviour breakdown I am seeing: Cold Launch (Siri/Search → App completely closed) SwiftUI App: Works as documented. The intent is present in connection options. scene(_:willPerformAppIntent:) is not called. UIKit App (with AppIntentSceneDelegate): The connectionOptions.appIntent property is completely nil inside scene(:willConnectTo:options:). Instead, the intent is delivered late via scene(:willPerformAppIntent:)
0
0
203
1d
AppShortcutsProvider not detected by the Shortcuts app – app built entirely with Swift Playgrounds
Context I built an app entirely using Swift Playgrounds on iPad (no access to a Mac / Xcode). The app is distributed via TestFlight and installed on an iPhone. Problem I implemented an AppShortcutsProvider with simple AppShortcut entries (code below), but no shortcuts show up in the Shortcuts app, in the list of apps with shortcuts, or via Siri. What I've already tried without success: Full restart of the iPhone Deleting the app's data Fully uninstalling and reinstalling the app A new TestFlight build (with incremented build number) after adding the code Confirming the phrases correctly include (.applicationName) as required Question Is the Extract AppIntentsMetadata build step (which generates the metadata.appintents file) actually executed when compiling/submitting via Swift Playgrounds on iPad, or is this a known limitation of the tool that would prevent App Shortcuts from being indexed by Shortcuts/Siri? Provider code: import SwiftUI import AppIntents // ==========================================
0
0
28
1d
AppShortcutsProvider not detected by the Shortcuts app – app built entirely with Swift Playgrounds + TestFlight
Context I built an app entirely using Swift Playgrounds on iPad (no access to a Mac / Xcode). The app is distributed via TestFlight and installed on an iPhone. Problem I implemented an AppShortcutsProvider with simple AppShortcut entries (code below), but no shortcuts show up in the Shortcuts app, in the list of apps with shortcuts, or via Siri. What I've already tried without success: Full restart of the iPhone Deleting the app's data Fully uninstalling and reinstalling the app A new TestFlight build (with incremented build number) after adding the code Confirming the phrases correctly include (.applicationName) as required Question Is the Extract AppIntentsMetadata build step (which generates the metadata.appintents file) actually executed when compiling/submitting via Swift Playgrounds on iPad, or is this a known limitation of the tool that would prevent App Shortcuts from being indexed by Shortcuts/Siri? Environment Swift Playgrounds version: [check in the app under Settings > General > About] iOS v
0
0
38
1d
False-positive guardrail blocks guided generation for sports data
I’m developing a factual snooker application using the on-device SystemLanguageModel on the current iOS 27, Xcode and macOS betas. The app allows someone to ask questions about professional snooker players. A tool searches my server and returns verified player data such as the player’s ID, name, nationality and date of birth. I have encountered a reproducible false-positive guardrail violation when the user asks about the professional snooker player Judd Trump. For example: Tell me about Judd Trump With the default model configuration, the request fails because the input or output is classified as potentially sensitive or unsafe. Using permissive content transformations solves the problem when generating a normal String: let model = SystemLanguageModel( useCase: .general, guardrails: .permissiveContentTransformations ) let session = LanguageModelSession( model: model, tools: [FindPlayerTool()], instructions: Answer factual questions about professional snooker players. Always use the supplied tool and only us
0
0
224
1d
Reply to Performance degradation and redraw loops when syncing SwiftUI Charts with custom AxisMarks
From a perfomance perspective your going to have a few issues here. every time the scroll position updates (for either chart) both charts will need to fully re-evaluting there full content the scroll position binding is not going to keep these charts perfectly in sync, in when it comes to edge effect bounces. To solve issue 1) do not bound your chartScrollPosition bindings from within the same hosting view as the Chart. Instead higher up in your view tree create an @Observable class and inject that into the env. then create a SwiftUI ViewModifer that reads this env value and from it creates a binding for the .chartScrollPosition(id: $state.scrollPos) then you arched this to your chart Chart {}.viewModifier(MyScrollModifer()) you shoudl also do the same for the axis modifier. This way when the scroll offset updates your not triggering on each tiny update the full chart content to re-evaluate. for issue number 2, you can use the swfitui scroll behavior modifiers to stop your charts having over scroll t
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1d
How can I prevent Siri Remote Back button from dismissing a fullScreenCover on tvOS?
I'm developing a tvOS application using SwiftUI, and I have a custom video player presented using fullScreenCover. .fullScreenCover(isPresented: $isPlayerPresented) { PlayerView() } I would like to implement the same kind of behavior commonly seen in video players: The player is presented full screen. When the playback controls are visible, pressing the Siri Remote Back button should hide the controls. The player should remain presented. Only when the controls are already hidden should pressing Back dismiss the player. However, I am unable to intercept the Back button before the fullScreenCover is dismissed. I have tried several approaches, including: .onExitCommand { // Handle Back } and handling UIPress / .menu events through UIKit. The problem is that when the Siri Remote Back button is pressed while the view is presented using fullScreenCover, the fullScreenCover is dismissed directly. My custom view does not appear to be able to prevent the dismissal. I also tried placing a custom UIView / UITap
0
0
56
2d
iOS 27 regression: Objects whose properties are bound to items displayed in a Menu are not correctly deallocated
A regression has been introduced with SwiftUI Menu in iOS 27 betas (still present in beta 6). This regression prevents objects whose properties are bound to contained Menu items from being correctly deallocated. In the example below, Player was immediately deallocated when the surrounding ModalView was dismissed on iOS 26 (or below): import Observation import SwiftUI @Observable final class Player { var playbackSpeed: Double = 1 } struct ModalView: View { @State private var player = Player() var body: some View { Menu { Picker(selection: $player.playbackSpeed) { ForEach([0.5, 1, 1.5, 2], id: .self) { speed in Text((speed, specifier: %g×)).tag(speed) } } label: { Text(Speed) } .pickerStyle(.inline) } label: { Text(Menu) } } } This is not the case anymore on iOS 27 beta. The Player instance is not deallocated anymore. A dedicated feedback (FB24486991) has been opened.
0
0
42
2d
Reply to Using isActivityFullscreen to build applications in xcode 16 will crash in ios 17
I encountered the same situation, but the version is Xcode 27 Beta 6, and the device is iOS 17. The minimal reproducible code is as follows: import SwiftUI import WidgetKit @main struct Xcode27LACrashApp: App { @Environment(.isActivityFullscreen) private var isActivityFullscreen var body: some Scene { WindowGroup { Text(isActivityFullscreen ? fullscreen : not fullscreen) } } } Crash info: dyld[712]: Symbol not found: _$s7SwiftUI17EnvironmentValuesV9WidgetKitE20isActivityFullscreenSbvg Referenced from: <6C188284-51F7-38B5-833C-13FDC11E4C2C> /private/var/containers/Bundle/Application/71A82AE6-495A-45AA-B823-A2E2597D6F6E/Xcode27LACrash.app/Xcode27LACrash.debug.dylib Expected in: <064E500D-3AE0-34EC-9759-52B592E7B15A> /System/Library/Frameworks/WidgetKit.framework/WidgetKit FB24532892
Replies
Boosts
Views
Activity
2h
Reply to String catalog for app target and widget target and common code
@Developer Tools Engineer wow this is so cool! Thank you so much for your guidance!! As per Use generated localizable symbols in your code The following works: Create a String Catalog file called Common.xcstrings Edit Common.xcstrings to add a symbol dog (This should be a symbol and not a string, by default it was creating as a symbol) Now in SwiftUI it can be used as Text(.Common.dog) It's really cool that these static properties are created automatically.
Replies
Boosts
Views
Activity
3h
Reply to SwiftUI, iOS 26.2, ToolbarItem .largeTitle and .title, overlap issue
Filed as FB24528594 with a minimal single-file repro. One finding worth adding to this thread: the collapsed-bar breakage doesn't need the .title item at all. With .inlineLarge and only a custom ToolbarItem(placement: .largeTitle), every scroll collapse leaves the collapsed bar with no title, no bar material or edge treatment, and content drawing through the status bar; it recovers on re-expansion. A .largeSubtitle item alone doesn't trigger it, and adding one to the .largeTitle item breaks the same way with the subtitle content vanishing too. Reproduced 100% on the iOS 26.5 simulator (Xcode 26.6), light and dark. No workaround found; navigationItem.titleView doesn't hold because SwiftUI re-renders the compact title after toolbar churn.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
7h
Reply to Error in transporter to upload the pkg to app store connect
I am new for apple developer. created my app by python It's probably not a good idea for a new developer to attempt what is probably one of the most difficult technological achievements possible. Apple has a wealth of information on how to write apps in Swift and SwiftUI. I recommend that approach.
Replies
Boosts
Views
Activity
17h
.presentationPlacement(.leading) does not work!
When I try to apply .presentationPlacement(), I get this error: dyld[7938]: Symbol not found: _$s7SwiftUI21PresentationPlacementV7leadingACvgZ Referenced from: /private/var/containers/Bundle/Application/101B4DDE-56D9-4742-AABB-AE11E2415145/ShopperTransit2026.app/ShopperTransit2026.debug.dylib Expected in: <1FA062F0-69E6-3C8A-962D-F3DEF020CB94> /System/Library/Frameworks/SwiftUI.framework/SwiftUI Even having the method show up when using an extension View {}, it still causes this problem I'm not sure exactly why this is caused. Guessing from the missing symbol error, that Xcode does not have this symbol in the code. However, this line of code does work in #Preview {}. So I am completely unsure as to why it doesn't work on regular hardware. Does anyone have a clue why?
Replies
2
Boosts
0
Views
33
Activity
19h
SwiftUI List swipeActions stutter with variable row heights on ProMotion
I have isolated a reproducible animation issue involving SwiftUI List, system .swipeActions, variable row heights, and ProMotion. Environment: iPhone 17 Pro Max iOS 26.6 Xcode 26.5 Low Power Mode off “Limit Frame Rate” off iOS screen recording off When a List contains alternating single-line and two-line rows whose heights are determined naturally, slowly dragging a row left to reveal .swipeActions causes a visible pause. The row briefly stops following the finger, then jumps left. The trailing action buttons appear suddenly instead of being progressively revealed. Fast swipes are usually smooth. I created a minimal project with two modes: Variable: alternating single-line and two-line rows use their natural heights. Uniform: the same contents are constrained to a uniform height. Both modes use the same List, SF Symbol, tap gesture, and .swipeActions. The issue reproduces consistently in Variable mode, while Uniform mode remains smooth. A simplified version of the Row is: ForEach(0..<20, id: .self
Replies
0
Boosts
0
Views
198
Activity
1d
UIKit AppIntentSceneDelegate: connectionOptions.appIntent is nil on cold launch (iOS Beta) -
Hi everyone, I am currently implementing the new Search API in a UIKit app using @AppIntent(schema: .system.search), ShowInAppSearchResultsIntent, and UISceneAppIntent. While testing on the iOS beta, I’ve hit a significant lifecycle disparity between how UIKit and SwiftUI apps process system intents during a process-cold launch. According to the documentation for UIScene.ConnectionOptions.appIntent, this property should contain the intent that triggered the scene creation. However, in a UIKit app with a single-window scene lifecycle, this isn't happening consistently. Here is the behaviour breakdown I am seeing: Cold Launch (Siri/Search → App completely closed) SwiftUI App: Works as documented. The intent is present in connection options. scene(_:willPerformAppIntent:) is not called. UIKit App (with AppIntentSceneDelegate): The connectionOptions.appIntent property is completely nil inside scene(:willConnectTo:options:). Instead, the intent is delivered late via scene(:willPerformAppIntent:)
Replies
0
Boosts
0
Views
203
Activity
1d
Reply to requestReview() prompting repeatedly
Do you use SwiftUI or UIKit? I see this in SwiftUI so I was thinking maybe it is worthy to check if UIKit is not affected.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
1d
AppShortcutsProvider not detected by the Shortcuts app – app built entirely with Swift Playgrounds
Context I built an app entirely using Swift Playgrounds on iPad (no access to a Mac / Xcode). The app is distributed via TestFlight and installed on an iPhone. Problem I implemented an AppShortcutsProvider with simple AppShortcut entries (code below), but no shortcuts show up in the Shortcuts app, in the list of apps with shortcuts, or via Siri. What I've already tried without success: Full restart of the iPhone Deleting the app's data Fully uninstalling and reinstalling the app A new TestFlight build (with incremented build number) after adding the code Confirming the phrases correctly include (.applicationName) as required Question Is the Extract AppIntentsMetadata build step (which generates the metadata.appintents file) actually executed when compiling/submitting via Swift Playgrounds on iPad, or is this a known limitation of the tool that would prevent App Shortcuts from being indexed by Shortcuts/Siri? Provider code: import SwiftUI import AppIntents // ==========================================
Replies
0
Boosts
0
Views
28
Activity
1d
AppShortcutsProvider not detected by the Shortcuts app – app built entirely with Swift Playgrounds + TestFlight
Context I built an app entirely using Swift Playgrounds on iPad (no access to a Mac / Xcode). The app is distributed via TestFlight and installed on an iPhone. Problem I implemented an AppShortcutsProvider with simple AppShortcut entries (code below), but no shortcuts show up in the Shortcuts app, in the list of apps with shortcuts, or via Siri. What I've already tried without success: Full restart of the iPhone Deleting the app's data Fully uninstalling and reinstalling the app A new TestFlight build (with incremented build number) after adding the code Confirming the phrases correctly include (.applicationName) as required Question Is the Extract AppIntentsMetadata build step (which generates the metadata.appintents file) actually executed when compiling/submitting via Swift Playgrounds on iPad, or is this a known limitation of the tool that would prevent App Shortcuts from being indexed by Shortcuts/Siri? Environment Swift Playgrounds version: [check in the app under Settings > General > About] iOS v
Replies
0
Boosts
0
Views
38
Activity
1d
False-positive guardrail blocks guided generation for sports data
I’m developing a factual snooker application using the on-device SystemLanguageModel on the current iOS 27, Xcode and macOS betas. The app allows someone to ask questions about professional snooker players. A tool searches my server and returns verified player data such as the player’s ID, name, nationality and date of birth. I have encountered a reproducible false-positive guardrail violation when the user asks about the professional snooker player Judd Trump. For example: Tell me about Judd Trump With the default model configuration, the request fails because the input or output is classified as potentially sensitive or unsafe. Using permissive content transformations solves the problem when generating a normal String: let model = SystemLanguageModel( useCase: .general, guardrails: .permissiveContentTransformations ) let session = LanguageModelSession( model: model, tools: [FindPlayerTool()], instructions: Answer factual questions about professional snooker players. Always use the supplied tool and only us
Replies
0
Boosts
0
Views
224
Activity
1d
Reply to Performance degradation and redraw loops when syncing SwiftUI Charts with custom AxisMarks
From a perfomance perspective your going to have a few issues here. every time the scroll position updates (for either chart) both charts will need to fully re-evaluting there full content the scroll position binding is not going to keep these charts perfectly in sync, in when it comes to edge effect bounces. To solve issue 1) do not bound your chartScrollPosition bindings from within the same hosting view as the Chart. Instead higher up in your view tree create an @Observable class and inject that into the env. then create a SwiftUI ViewModifer that reads this env value and from it creates a binding for the .chartScrollPosition(id: $state.scrollPos) then you arched this to your chart Chart {}.viewModifier(MyScrollModifer()) you shoudl also do the same for the axis modifier. This way when the scroll offset updates your not triggering on each tiny update the full chart content to re-evaluate. for issue number 2, you can use the swfitui scroll behavior modifiers to stop your charts having over scroll t
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
1d
Reply to dropDestination does not work inside List
I also created SwiftUI Form/List prevents .dropDestination from receiving drops - FB24490454
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
2d
How can I prevent Siri Remote Back button from dismissing a fullScreenCover on tvOS?
I'm developing a tvOS application using SwiftUI, and I have a custom video player presented using fullScreenCover. .fullScreenCover(isPresented: $isPlayerPresented) { PlayerView() } I would like to implement the same kind of behavior commonly seen in video players: The player is presented full screen. When the playback controls are visible, pressing the Siri Remote Back button should hide the controls. The player should remain presented. Only when the controls are already hidden should pressing Back dismiss the player. However, I am unable to intercept the Back button before the fullScreenCover is dismissed. I have tried several approaches, including: .onExitCommand { // Handle Back } and handling UIPress / .menu events through UIKit. The problem is that when the Siri Remote Back button is pressed while the view is presented using fullScreenCover, the fullScreenCover is dismissed directly. My custom view does not appear to be able to prevent the dismissal. I also tried placing a custom UIView / UITap
Replies
0
Boosts
0
Views
56
Activity
2d
iOS 27 regression: Objects whose properties are bound to items displayed in a Menu are not correctly deallocated
A regression has been introduced with SwiftUI Menu in iOS 27 betas (still present in beta 6). This regression prevents objects whose properties are bound to contained Menu items from being correctly deallocated. In the example below, Player was immediately deallocated when the surrounding ModalView was dismissed on iOS 26 (or below): import Observation import SwiftUI @Observable final class Player { var playbackSpeed: Double = 1 } struct ModalView: View { @State private var player = Player() var body: some View { Menu { Picker(selection: $player.playbackSpeed) { ForEach([0.5, 1, 1.5, 2], id: .self) { speed in Text((speed, specifier: %g×)).tag(speed) } } label: { Text(Speed) } .pickerStyle(.inline) } label: { Text(Menu) } } } This is not the case anymore on iOS 27 beta. The Player instance is not deallocated anymore. A dedicated feedback (FB24486991) has been opened.
Replies
0
Boosts
0
Views
42
Activity
2d