Problem debugging on iOS from Xcode


I’m trying to figure out how to debug my game when running it on an iPhone. I’m a bit confused about the needed steps and the errors I’m getting.

  • “Launch” from the Editor works fine, it runs the game.

  • In XCode, i selected MyProject -> Edit Scheme -> Run, and changed the build configuration to “Debug”. Is this the correct thing to do in order to launch to the device?

  • Now I can select my iPhone as target next to the project name in the toolbar

  • When I click the play button in the toolbar, it seems to build succesfully, but gives the error “” couldn’t be opened because there is no such file. Looks like it is trying to run a Mac executable…?

  • Also I’m a bit confused about Cooking: in the Editor, there is “Cook content for Mac”. Is this for actually running the game on the Mac, or is it useful for running on iOS too? Or is cooking strictly necessary at all, if all I want is to debug on iOS? When i try to run the “Cook content for Mac”, it gives an “Missing UE4Game binary” error dialog.

Thanks for any help!

You have to change the product name under the build settings for the app target. For some reason, the developers attempted to use an xcode condition in order to use different product names for Mac and iOS, but xcode clearly warns about it with a “no condition allowed” message appearing in the settings. By default, it uses the Mac product name, but it builds using the iOS product, which is why the app cannot be ran. Just explicitly change the product name and remove the unsupported conditional names from the settings. I’m not sure how this wasn’t caught during testing as the generated xcode project for iOS fails out of the box. As far as cooking, you can use the BuildCookRun command to cook yr content, or simply choose the package for iOS option in the editor and the assets will be cooked and packaged. Then you can run the xcode project which will use the cooked assets.