Post

Replies

Boosts

Views

Activity

Tab button's ax identifier is missing when using `.sidebarAdaptable` TabViewStyle
Hello, I found that if you apply the new .sidebarAdaptable tab view style, the accessibility identifiers of tab bar buttons are missing. import SwiftUI struct ContentView: View { var body: some View { TabView { Tab("Received", systemImage: "tray.and.arrow.down.fill") { Text("Received") } .accessibilityIdentifier("tab.received") // 👀 Tab("Sent", systemImage: "tray.and.arrow.up.fill") { Text("Sent") } .accessibilityIdentifier("tab.sent") // 👀 Tab("Account", systemImage: "person.crop.circle.fill") { Text("Account") } .accessibilityIdentifier("tab.account") // 👀 } .tabViewStyle(.sidebarAdaptable) // 👈 if remove this, ax identifiers are ok } } #Preview { ContentView() } The identifiers automatically appear after a few seconds. But this behaviour breaks a lot of the UI test cases.
2
0
475
Sep ’24
StoreKit Causing Unrelated SwiftUI View to Freeze
Hello everyone! I've encountered an issue related to SwiftUI and StoreKit. Please take a look at the SwiftUI code snippet below: import SwiftUI struct ContentView: View { var body: some View { NavigationStack { List { NavigationLink { Page1() } label: { Text("Go to Page 1") } } } } } struct Page1: View { @Environment(\.dismiss) private var dismiss @State private var string: String = "" var body: some View { List { NavigationLink { List { Page2(string: $string) .simpleValue(4) } } label: { Text("Tap this button will freeze the app") } } .navigationTitle("Page 1") } } struct Page2: View { @Binding var string: String? init(string: Binding<String>) { self._string = Binding(string) } var body: some View { Text("Page 2") } } extension EnvironmentValues { @Entry var simpleValue: Int = 3 } extension View { func simpleValue(_ value: Int) -> some View { self.environment(\.simpleValue, value) } } This view runs normally until the following symbol is referenced anywhere in the project: import StoreKit extension View { func notEvenUsed() -> some View { self.manageSubscriptionsSheet(isPresented: .constant(false)) } } It seems that once the project links the View.manageSubscriptionsSheet(isPresented:) method, regardless of whether it's actually used, it causes the above SwiftUI view to freeze. Steps to Reproduce: Clone the repository: https://github.com/gongzhang/StrangeFreeze Open it in Xcode 16 and run on iOS 17-18.1 Navigate to the second page and tap the button, causing the app to freeze. Remove manageSubscriptionsSheet(...), then everything will work fine
2
0
466
Dec ’24
Button Glass Style Incorrect in Sheet + ScrollView on Mac Catalyst 26
Hi everyone! I've encountered an issue when using Sheet + ScrollView on Mac Catalyst: the buttons in the toolbar appear with an abnormal gray color. import SwiftUI struct ContentView: View { var body: some View { VStack { } .sheet(isPresented: .constant(true)) { Sheet() } } } struct Sheet: View { var body: some View { NavigationStack { ScrollView { // <-- no issue if use List } .toolbar { Button(action: {}) { // <-- 👀 weird gray color Image(systemName: "checkmark") } } } } } Steps to Reproduce: On macOS 26.0 beta 9, use Xcode 26.0 beta 7 to create an iOS project and enable Mac Catalyst. Paste the code above. Select the Mac Catalyst scheme and run the project. The buttons in the toolbar show a strange gray appearance. If you change the ScrollView to a List in the code, the issue does not occur. FB20120285
2
0
365
Oct ’25
Xcode Cloud: All Targets Suddenly Timeout During Archive
Hi everyone, Starting today, my Xcode Cloud CI workflow can no longer successfully build iOS/macOS/visionOS targets. The Archive step does not report any errors, but the xcodebuild command hangs indefinitely and eventually fails with the following message: The step invocation hit a user timeout. The xcodebuild archive invocation timed out. No activity has been detected on stdout, stderr or the result bundle in 30 minutes. My iOS and macOS targets can still be built, but the build time has increased by 2-3x compared to before. That's interesting. After I removed the visionOS target, the iOS target also failed to build. Additionally, since today, I’ve noticed a significant increase in network-related errors in Xcode Cloud. There have been multiple failures to download dependencies from Homebrew or GitHub. I have confirmed that CI versions which previously built successfully are now failing, while running the same build commands locally works fine. Based on these observations, I suspect there may be an issue with the Xcode Cloud environment itself. Has anyone else encountered similar problems? Any suggestions or updates would be appreciated! Thanks!
2
3
205
Nov ’25
SwiftUI NavigationLink unexpectly pops itself in very simple use case (iOS 15 only)
I just discovered that the following simple code snippet has a very confusing behavior on iOS 15.0-15.1. When I go to the NavigationLink, the child page pops up unexpectly once the app goes into the background and reopens. This issue does not happen on iOS 14. struct ContentView: View {   var body: some View {     NavigationView {       TabView {         NavigationLink {           Text("👀 Go to background. This view will pop.")         } label: {           Text("Push")         }       }     }     .navigationViewStyle(.stack)   } } You may have noticed that I have nested the TabView in the NavigationView, and this issue is related to this structure. Like many social apps such as Telegram and WeChat, I believe nesting TabView in NavigationView is a widely used structure. I am very hopeful that this issue will be resolved.
1
0
800
Dec ’21
Strange 0x8BADF00D crash in dyld4::Loader
Hello! My app has been experiencing some strange crashes in the last few months. The crash log shows it as a Watchdog timeout error of 0x8BADF00D. I knew about this error code before, especially since here is the documentation about addressing-watchdog-terminations. But actually, the call stack shows that the crash appears in dydl and it seems that my app code has not been executed yet. Does anyone know the cause of this problem please? I have observed this crash on iOS 15.6, 15.5, 15.4, and earlier versions. Incident Identifier: 82D9B8D8-88B3-4016-9CB5-5AE280006628 Hardware Model: iPhone10,6 Process: *** [297] Path: /private/var/containers/Bundle/Application/FDF7C78A-E217-482E-A20C-D602C117EB68/***.app/*** Identifier: com.***.*** Version: 3.1 (7774) AppStoreTools: 13C90b AppVariant: 1:iPhone10,6:15 Code Type: ARM-64 (Native) Role: unknown Parent Process: launchd [1] Coalition: com.***.*** [466] Date/Time: 2022-03-18 07:20:38.2452 +0200 Launch Time: 2022-03-18 07:19:37.6871 +0200 OS Version: iPhone OS 15.4 (19E241) Release Type: User Baseband Version: 5.02.02 Report Version: 104 Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: FRONTBOARD 2343432205 &lt;RBSTerminateContext| domain:10 code:0x8BADF00D explanation:process-launch watchdog transgression: application&lt;com.***.***&gt;:297 exhausted real (wall clock) time allowance of 60.00 seconds ProcessVisibility: Background ProcessState: Running WatchdogEvent: process-launch WatchdogVisibility: Background WatchdogCPUStatistics: ( "Elapsed total CPU time (seconds): 283.260 (user 283.260, system 0.000), 78% CPU", "Elapsed application CPU time (seconds): 0.021, 0% CPU" ) reportType:CrashLog maxTerminationResistance:Interactive&gt; Triggered by Thread: 0 Thread 0 Crashed: 0 dyld 0x0000000104f82b60 ___ZNK5dyld46Loader13resolveSymbolER11DiagnosticsRNS_12RuntimeStateEiPKcbbU13block_pointerFvjjRKNS0_14ResolvedSymbolEEb_block_invoke.94 + 428 (Loader.cpp:1539) 1 dyld 0x0000000104f71308 dyld4::Loader::resolveSymbol(Diagnostics&amp;, dyld4::RuntimeState&amp;, int, char const*, bool, bool, void (unsigned int, unsigned int, dyld4::Loader::ResolvedSymbol const&amp;) block_pointer, bool) const + 348 (Loader.cpp:1504) 2 dyld 0x0000000104f84cd8 ___ZNK5dyld416JustInTimeLoader17forEachBindTargetER11DiagnosticsRNS_12RuntimeStateEU13block_pointerFvjjRKNS_6Loader14ResolvedSymbolEEbU13block_pointerFvS8_RbESD__block_invoke.46 + 124 (JustInTimeLoader.cpp:621) 3 dyld 0x0000000104f9a9d4 ___ZNK5dyld313MachOAnalyzer25forEachBindTarget_OpcodesER11DiagnosticsbU13block_pointerFvRKNS0_14BindTargetInfoERbES8__block_invoke.408 + 64 (MachOAnalyzer.cpp:5782) 4 dyld 0x0000000104f9a794 dyld3::MachOAnalyzer::forEachBind_OpcodesWeak(Diagnostics&amp;, dyld3::MachOLoaded::LinkEditInfo const&amp;, dyld3::MachOFile::SegmentInfo const*, void (char const*, dyld3::MachOLoaded::LinkEditInfo const&amp;... + 728 (MachOAnalyzer.cpp:6161) 5 dyld 0x0000000104f99b60 dyld3::MachOAnalyzer::forEachBindUnified_Opcodes(Diagnostics&amp;, bool, void (unsigned long long, dyld3::MachOAnalyzer::BindTargetInfo const&amp;, bool&amp;) block_pointer, void (unsigned long long, dyld3::Ma... + 632 (MachOAnalyzer.cpp:5763) 6 dyld 0x0000000104f9975c dyld3::MachOAnalyzer::forEachBindTarget_Opcodes(Diagnostics&amp;, bool, void (dyld3::MachOAnalyzer::BindTargetInfo const&amp;, bool&amp;) block_pointer, void (dyld3::MachOAnalyzer::BindTargetInfo const&amp;, bool&amp;... + 148 (MachOAnalyzer.cpp:5773) 7 dyld 0x0000000104f84304 dyld4::JustInTimeLoader::forEachBindTarget(Diagnostics&amp;, dyld4::RuntimeState&amp;, void (unsigned int, unsigned int, dyld4::Loader::ResolvedSymbol const&amp;) block_pointer, bool, void (dyld4::Loader::Reso... + 176 (JustInTimeLoader.cpp:608) 8 dyld 0x0000000104f732d4 dyld4::JustInTimeLoader::applyFixups(Diagnostics&amp;, dyld4::RuntimeState&amp;, dyld4::DyldCacheDataConstLazyScopedWriter&amp;, bool) const + 388 (JustInTimeLoader.cpp:412) 9 dyld 0x0000000104f79758 dyld4::prepare(dyld4::APIs&amp;, dyld3::MachOAnalyzer const*) + 1592 (dyldMain.cpp:573) 10 dyld 0x0000000104f783b0 start + 412 (dyldMain.cpp:864) Thread 0 crashed with ARM Thread State (64-bit): x0: 0x00000001c076a000 x1: 0x00000000000002f1 x2: 0x000000016b4aa198 x3: 0x000000016b4aa190 x4: 0x0000000000000001 x5: 0x000000016b4ac638 x6: 0x0000000000000000 x7: 0x000000016b4ad160 x8: 0x0000000180000000 x9: 0x000000034076a000 x10: 0x0000000000000000 x11: 0x0000000000000001 x12: 0x0000000104bf278b x13: 0x0000000000000000 x14: 0x00000001ffd94d24 x15: 0x0000000000000001 x16: 0x0000000104fa5070 x17: 0x0000000000000a06 x18: 0x0000000000000000 x19: 0x000000016b4ac6c8 x20: 0x0000000104c50dc0 x21: 0x0000000000000001 x22: 0x000000020b59cad8 x23: 0x000000016b4ac630 x24: 0x000000016b4aa1b0 x25: 0x0000000000000002 x26: 0x0000000000000247 x27: 0x0000000104c55a90 x28: 0x0000000000000770 fp: 0x000000016b4ac6b0 lr: 0x0000000104f82b60 sp: 0x000000016b4aa1b0 pc: 0x0000000104f82b60 cpsr: 0x20000000 esr: 0x92000007 (Data Abort) byte read Translation fault Binary Images: 0x104f60000 - 0x104fb3fff dyld arm64 &lt;5c4972a8ef8132dca84842cc7f7874cf&gt; /usr/lib/dyld EOF
1
0
2.2k
Jun ’22
iOS 16.2 breaks ProgressView(timerInterval:countsDown:) on Dynamic Island or on Always-On Lock Screen
I used ProgressView to display a countdown progress bar in a Live Activity. However, I found that since iOS 16.2, ProgressView(timerInterval:countsDown:) does not update properly in the following situations. on Dynamic Island (either Expanded or CompactLeading/Trailing) on the Locked Screen, after the display is turned off (isLuminanceReduced == true) In these situations, the ProgressView for the countdown is always displayed at 100% and does not automatically update with the time. The problem only occurs in iOS 16.2. And it's confusing for users. Will it be fixed please?
1
2
2k
Aug ’23
Swift 5.7 compiler doesn't check API availability of PropertyWrapper
I found that in Xcode 14.2 (Swift 5.7), the compiler is unable to check the API availability of PropertyWrappers. For example, SwiftUI.StateObject was introduced in iOS 14, but when compiling for iOS 13, the compiler doesn't give an error. This leads to runtime dylib errors. struct ContentView: View { class Data: ObservableObject {} @StateObject private var data = Data() // 🤔️ No compiler error when targeting iOS 13 var body: some View { Text("Hello") } } The app will crash on iOS 13. dyld: lazy symbol binding failed: Symbol not found: _$s7SwiftUI11StateObjectV12wrappedValueACyxGxyXA_tcfC However, when we use StateObject in a regular statement, the compiler gives an error as expected. This is the correct behavior. init() { _data = StateObject(wrappedValue: Data()) // 'StateObject' is only available in iOS 14.0 or newer } So, it seems that the availability check for PropertyWrappers is not working.
1
1
757
Feb ’23
visionOS: How to implement vibrancy text style using SwiftUI?
Hi, I'm trying to apply the Vibrancy text style to SwiftUI Text. However, I didn't find proper API to do this. As the session video wwdc2023-10076 said, vibrancy brightens foreground content that displays on top of a material and works by pulling light and color forward from what's behind it. However, when I set .secondary foreground style to a Text, it's just some graycolor with a constant alpha value. It there any other API to achieve the vibrancy style? Thanks!
1
0
1.4k
Jul ’23
Xcode 15 beta 5: watch face previews (accessoryRectangular/Circular) render multicolor face in tinted mode
In Xcode 15 beta 1 to 5, the watch face preview of accessoryRectangular and accessoryCircular are always rendered in tinted mode, even if you choose multicolor. (NOTE: Please don't ask me to provide diagnostic data for Preview. Because this issue is 100% reproducible.)
1
0
905
Jul ’23
Xcode 15 beta 5 + iOS 17 beta 4: AppShortcuts do not show up in Shortcuts app
In Xcode 15 beta 5 + iOS 17 beta 4, the AppShortcuts (or maybe Shortcuts app) is broken. The AppShortcuts defined in AppShortcutsProvider are not shown up in the Shortcuts app any more. Reproduce Code import SwiftUI import AppIntents @main struct LearnShortcutsApp: App { var body: some Scene { WindowGroup { Text("Hello, world!") } } } struct MyAction: AppIntent { static let title: LocalizedStringResource = "My Action" func perform() async throws -> some IntentResult { return .result() } } struct MyAppShortcts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut(intent: MyAction(), phrases: [ "Perform action with \(.applicationName)" ], shortTitle: "Perform My Action", systemImageName: "heart") } }
1
1
754
Jul ’23
NavigationStack on iOS 17: NavigationStack can't maintain cell selection effect and experiences jumping
When using NavigationStack and NavigationLink, even in very simple situations, the behavior is not normal. When tapping on a NavigationLink, the cell's selected state cannot be maintained. The selection effect is not visible when pushing and popping views. This makes it difficult for users to track their selected content and the current view. At the moment of tapping a NavigationLink, the scroll offset of the List jumps, which affects the experience very much. (Before tapping a cell, as long as the page is not at the top, it can be reproduced 100%)
1
1
1.2k
Jul ’23