Adding code to project breaks iOS deployment

System: OS X 10.9.2, 2.6ghz i7, 16gb RAM, NVIDIA GeForce GT 750M 2048 MB
Build: 4.2.0-2092659

Steps to reproduce:

  1. Create a new project (eg, Vehicle Template (Blueprint)).

  2. Run it on a device to verify that the vanilla build works fine.

  3. Add code to the project (I added an empty game mode).

  4. Close the UE4 editor and relaunch. You’ll be prompted to recompile since the game module is outdated.

  5. After compilation is complete, launch to device again from the Editor. I get this error:

    LogPlayLevel:Display: env: xcodebuild: error: The project ‘BPVehicleTemplate_IOS’ does not contain a scheme named ‘BPVehicleTemplate - iOS’.

This causes the AutomationTool to exit so launching fails.

I made a ton of changes to my current project in an attempt to remedy this but I haven’t had any luck yet. I’m going to see if I can get a vanilla project with added code working again. It seems that either the desired scheme goes missing after adding code/recompiling, or the scheme’s target name changes. I haven’t dug in quite yet so I’m not sure.

If you delete the generated {ProjectName}_IOS.xcodeproj file then you should be able to launch to the device again. With my project, I made the mistake of chasing some plist error message and haven’t been able to find and remove the reference.

However, with the vanilla project removing the _IOS build worked.