All good and fine, except it seems like there is some race-condition inherent between the creation of the binary, and running it, and sometimes the binary would fail to launch properly, and UIKit would throw an error.
And could no longer reproduce it if I inserted a sleep 2s, either in my code or on the command line.
A bunch of rabbit holes later, I ended up finding all the winit.apps that existed on my system by running open -a winit (I had copied a few of them around), and deleting them; and suddenly everything worked fine again.
So it seems like there's something something launchctl something that keeps track of all application bundles, and that's having trouble with the bundle produced by cargo-bundle?
Idk., posting it here in case I hit the same issue again in a year.
So, this is a bit of a weird one.
I'm using
cargo-bundle
to launch the Winit examples on Mac Catalyst.The command I use is:
And then I run the binary with:
All good and fine, except it seems like there is some race-condition inherent between the creation of the binary, and running it, and sometimes the binary would fail to launch properly, and UIKit would throw an error.
I could reproduce it consistently with:
And could no longer reproduce it if I inserted a
sleep 2s
, either in my code or on the command line.A bunch of rabbit holes later, I ended up finding all the
winit.app
s that existed on my system by runningopen -a winit
(I had copied a few of them around), and deleting them; and suddenly everything worked fine again.So it seems like there's something something launchctl something that keeps track of all application bundles, and that's having trouble with the bundle produced by
cargo-bundle
?Idk., posting it here in case I hit the same issue again in a year.