Download

Running DebugGame on iOS looks for and can't find uproject file from OS X path

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?

I also grep’d ~Library, my clone of the engine from GitHub, and the project for NameOfProject.uproject and didn’t find anything interesting as to where it might be getting that value from during runtime.

Dug a little deeper – Unreal has some logic to convert OS X paths to iOS paths… Looks like it searches in two locations ultimately for the uproject file:

/var/containers/Bundle/Application/D07142E3-AD8C-4EFC-8001-CE9ED442C09A/AppName.app/cookeddata//users/username/desktop/projects/projectname/projectdirectory/projectname.uproject

/var/mobile/Containers/Data/Application/BFBC5C95-7189-4295-8E67-5B7936D440BF/Documents//Users/Username/Desktop/Projects/Projects/ProjectName/ProjectName.uproject

It’s not obvious to me if this is correct and the assets aren’t getting copied into the proper locations somehow, or if these paths are malformed?

I now realize I was making a couple blunders when debugging (a bit new to Unreal), I was using DebugGame while debugging Engine code, and I was getting poor values in the debugger which informed my conclusions incorrectly.

The base issue is that Internationalization (ICU) data can’t be found. I downloaded the package from the iOS device, and it looks the entire Content folder is missing which is where it seems to be expected. I’m not sure why it’s persistently not being packaged, but at least I’m moving in the right direction.