I’ve been generating the Xcode workspace and setting up a DebugGame scheme so I can run and debug C++ code directly out of Xcode. For the most part this works very well and code iterations are fast, but with a costly exception.
Once in a while I’m distracted or my lightning cable is twitchy, the iOS device will be unplugged while Xcode is building and preparing to run. For the deployment step Xcode will wait until the iOS device is plugged back in, but plugging in the iOS device doesn’t seem to make the dialog box go away. The target has now automatically switched to “Generic iOS Device” instead of my actual device. I’ll click cancel, select the correct device, and run again.
Xcode prepares, installs, and launches the game on the iOS device, but now (without any code changes) the running behavior is different – an assert is thrown which indicates it’s looking for a uproject file on the iOS device but with an OS X path. I’d have to speculate some configuration file got generated wrong somehow due to the unplugging, and the generated file is getting cached and not regenerated on subsequent runs since none of its dependents have changed.
Short of recompiling both the engine and project all over again, I haven’t been able to find a workaround. Wiping out the intermediate directory or recompiling the project isn’t enough. I’m looking to prevent this from happening and/or resolve it much more quickly when it does happen. Any ideas?