Has anyone else seen this happen with their macOS apps in TestFlight?
The situation:
When I launch my app that's been downloading via TestFlight.app, it often comes up with its main window deactivated.
Also, when I have open more than one window and close one, the other window doesn't come to front either.
In either case, activating the app or clicking into a window will activate it properly.
It feels as if there's another window that's not visible but somehow keeps getting activated.
I have this happen on two Macs running both Sonoma and Monterey.
Also, if I take the very same build that I had uploaded to TestFlight and run it directly, it works correctly. So I suspect that TestFlight somehow messes with my app's windows.
If you want to test this yourself: Get the app thru this link: https://findanyfile.app/TestFlight/
Then launch it. Often, the Find window will already come up without being active. Activate it, then open the Preferences window by typing cmd-comma. Then close the Prefs window with cmd-W. This should re-activate the Find window but will instead leave it deactivated, and none of the menu shortcuts (such as cmd-comma, cmd-N or cmd-Q) work. That's the bug.
I wonder how I can debug this to find a work-around for this odd behavior.
E.g, I'd like to see if there is indeed a semi-hidden window causing this. How would I do this? I could probably make a new TestFlight build that queries the app's windows array and logs it. But are there other ways to query an app's windows? I tried AppleScript, but since my app isn't scriptable, I only get an error -1728 for tell app "Find Any File" to get windows
.