I edited the code in the file NextTurnState.cpp according to the link you provided, the game didn't close when my phone was connected to Xcode, it just hung in the same place where the OK button was. After restarting, without connecting the phone to Xcode, crashes and freezes disappeared - the game continues to work as good. Unfortunately, when I first started, I didn't think to include error logging in the log.
There is one more nuance - it lies in the fact that the game running in the Xcode emulator does not perceive my physical and on-screen keyboard, so it is impossible to write the name of the base when creating it and test the game further, is there any way to fix this? I always have to download it to my phone, but my free developer certificate has critical limitations.