I have this issue with concurrency where it is crashing on a real device but not in the simulator. Are there any general steps I could take to troubleshoot these kinds of issues? Where something works on the simulator but not on the device?
How to Troubleshoot App Crashing on Real Device but Not on Simulator
A reason could be concurrency and timing. maybe things are slow enough on simulator, but when run faster on device, timing between threads is different.
Have you a crash report on device ?
Same with me. Xcode: 13.2.1, iPhone: 14.2 and 14.8 without "Debug executable" causes 100% crash. It's OK when I checked the "Debug executable".
I created new iOS project and added a button on ContentView and press the button.
Task("Hello, world!") .padding() Button("Run task") { Task.init { print("run task") } }
@arturo9419 Did you try to run on iPhone connected to the Mac, to debug (you should use release mode to be on real use conditions, but that could give you some hints for where to look at).