This turned out to be an issue with state management on my part, unrelated to Swift / SwiftUI / Previews. Sorry for the trouble :(
Post
Replies
Boosts
Views
Activity
My developer buddy asked me to clarify that as well, literally 2m after you posted... is your name IZZY?? ;)
Indeed this only occurs in the Simulator (via the Run button as you mentioned), not inside of Xcode Previews. That's what's so confusing :)
Since the call stack was collapsed in the screenshot, here's the expanded version. It looks like the SwiftUI Preview system up to something?
#0 0x00000001035e247c in closure #2 in AuthFirstCensusView.body.getter at /Users/vz/Documents/GitHub/reckoner-app/reckoner/Authentication/AuthFirstCensusView.swift:103
#1 0x00000001035e277c in partial apply for closure #2 in AuthFirstCensusView.body.getter ()
#2 0x00000001d1817138 in (1) await resume partial function for partial apply forwarder for closure #1 () async -> () in closure #1 (inout Swift.TaskGroup<()>) async -> () in closure #1 () async -> () in SwiftUI.AppDelegate.application(_: __C.UIApplication, handleEventsForBackgroundURLSession: Swift.String, completionHandler: () -> ()) -> () ()
#3 0x00000001d17b1e48 in (1) await resume partial function for dispatch thunk of static SwiftUI.PreviewModifier.makeSharedContext() async throws -> τ_0_0.Context ()
#4 0x00000001d19c10c0 in (1) await resume partial function for generic specialization <()> of reabstraction thunk helper <τ_0_0 where τ_0_0: Swift.Sendable> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out τ_0_0) to @escaping @callee_guaranteed @async () -> (@out τ_0_0, @error @owned Swift.Error) ()
#5 0x00000001d17b1e48 in (1) await resume partial function for dispatch thunk of static SwiftUI.PreviewModifier.makeSharedContext() async throws -> τ_0_0.Context ()
I searched both my code any the only UI library I import N-u-k-eUI (sorry, Apple censors the work that sounds like "Nooke") for makeSharedContext and no findings :(
I continue to receive this error on every build upload however it hasn't stopped TestFlight from working or my app from being approved 🤷♂️
The two libraries I'm using are Alamofire and ****, both of which have ancient version requirements and shouldn't be ticking this to 14.4.
I suspect this was addressed in iOS 17, as this appears to no longer be an issue when using this sample code.
I'm developing against iOS 16 and still need to work around this issue.
Hey folks! There's a number of these threads open and now a bug number. I'm cross-posting for visibility and will update if I find more:
Post: Xcode do not pause at breakponts on "Wait for the executable to be lauched" mode
Post: Xcode debugger doesn't pause on breakpoints (simulator SDK < iOS 17)
Comment: Feedback opened; FB13529134
Hey folks! There's a number of these threads open and now a bug number. I'm cross-posting for visibility and will update if I find more:
Post: Xcode do not pause at breakponts on "Wait for the executable to be lauched" mode
Post: Xcode debugger doesn't pause on breakpoints (simulator SDK < iOS 17)
Comment: Feedback opened; FB13529134
Also wondering if there's an open issue to track this. Bitten me too, and I need the debugger :)
I'm sure I'm going to hose the Combine terminology... but onReceive takes anything that conforms to Publisher. Trigger an auto-complete after the publisher to see what I mean.
In your case, collect() seems like what you want?
Collects all received elements, and emits a single array of the collection when the upstream publisher finishes.
I'm looking to be notified when any change occurs, but not of the individual items. collect() is perfect for me. Someone with actual Combine knowledge can likely offer something better :)
Mirror question on Stack Overflow.
Upgraded to Ventura (13.1) and now it works 🤷♂️
Hi Jason, thanks for the quick reply! Here are the vitals:
macOS Version 12.6.2 (Build 21G320)
Xcode 14.2 (21534) (Build 14C18)
Timestamp: 2023-01-09T08:42:44-08:00
I can successfully target and run on 16.0, so I don't believe I'm using any 16.2 APIs. I am of course using plenty of what's new in SwiftUI this year ;)
This is the content of the dialog that appears:
Unable To Install “<your bundle>”
This application requires a newer version of macOS.
The system version is lower than the minimum OS version specified for bundle at /var/db/appinstalld/Library/Caches/com.apple.mobile.installd.staging/temp.U90CDi/extracted/<app name>.app. Have 15.7; need 16.0
[ DETAILS ] [ OK ]
```
Finally, I am on the latest versions of everything I can find. I'm not sure what simulator? engine? service? this error message is referring to, when it says something is on 15.7.