Post

Replies

Boosts

Views

Activity

Reply to Task, onAppear, onDisappear modifiers run twice
I was able to reproduce this on iOS 17 by animating the view transitions by changing the top level MyApp to: @main struct MyApp: App { @State private var store = Store() var body: some Scene { WindowGroup { if store.shown { ContentView() .transition(.move(edge: .bottom)) } else { EmptyView() .transition(.move(edge: .bottom)) } } .environment(store) } } and the DetailView to: struct DetailView: View { @Environment(Store.self) private var store var body: some View { Button("Pop to top") { withAnimation { store.shown = false } } .task { print("DetailView task executed") } .onAppear { print("DetailView appeared") } .onDisappear { print("DetailView disappeared") } } } By the way, this only happens in this simple reproducer if the DetailView is shown from the ContentView within the NavigationView.
Topic: UI Frameworks SubTopic: SwiftUI
Oct ’24
Reply to Task, onAppear, onDisappear modifiers run twice
I was able to reproduce this on iOS 17 by animating the view transitions by changing the top level MyApp to: @main struct MyApp: App { @State private var store = Store() var body: some Scene { WindowGroup { if store.shown { ContentView() .transition(.move(edge: .bottom)) } else { EmptyView() .transition(.move(edge: .bottom)) } } .environment(store) } } and the DetailView to: struct DetailView: View { @Environment(Store.self) private var store var body: some View { Button("Pop to top") { withAnimation { store.shown = false } } .task { print("DetailView task executed") } .onAppear { print("DetailView appeared") } .onDisappear { print("DetailView disappeared") } } } By the way, this only happens in this simple reproducer if the DetailView is shown from the ContentView within the NavigationView.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Oct ’24
Reply to Xcode 16 'Open Recent' menu item is empty and won't populate
A reboot fixed mine.
Replies
Boosts
Views
Activity
Sep ’24
Reply to Remove Rosetta support on Xcode simulators
Found the solution: https://stackoverflow.com/questions/76110049/xcode-simulator-targets-show-rosetta
Replies
Boosts
Views
Activity
Dec ’23
Reply to Xcode 13.1 will gets "stuck" on iOS Monterey/ New 2021 pro
Looks like it's downloading VERY slowly and the progress within the App Store application doesn't match the progress of the Xcode.app progress wheel in from Finder in the Applications folder. It's been downloading/updating for 6 hours...almost done.
Replies
Boosts
Views
Activity
Oct ’21
Reply to Xcode 13.1 will gets "stuck" on iOS Monterey/ New 2021 pro
Intel-based Big Sur here with same issue. I installed another app at the same time and it hung as well. After rebooting, the other app said it was done but Xcode was still hung.
Replies
Boosts
Views
Activity
Oct ’21
Reply to App crashes when calling UIApplication.open
I get the same thing a LOT when I background an app with a map showing. My map has several circular regions and a current location marker.
Replies
Boosts
Views
Activity
Sep ’21