How to remove code from project?

Hello !

I want to launch my project on my iPhone, but when I use the Launch button i get:

Sorry, launching on a device is currently not supported for code-based iOS projects. This feature will be available in a future release.

I added some code a long time ago, but I’m no longer using it, the whole project is just using blueprints. If I delete the source folder the launch starts, but I get an error saying:

Program.Main: ERROR: Exception in AutomationTool: Game target not found. Game target is required with -cook or -cookonthefly

So my question is, How do I remove the code from the project to be able to launch the game on my iPhone.

I’m using UE4.6.1, on Windows.

Thanks.

I dont think you can siply delet code from your game without knowing what you changed, also that error is probably refering to the fact that you created a “code” project and not a a blueprint one.

The only way i see to fix this would be you creating a new “blueprint” project and copying the stuff you have on the old one, but dont take my word for it im still a begginer.

  1. Remove all references to code defined classes in all your assets.
  2. Open up the .uproject file in a text editor and remove the module corresponding to the project. In the following example, it would be the entire “Modules” section (not forgetting the last comma after the “Description” line to maintain a valid json syntax)
{
	"FileVersion": 3,
	"EngineAssociation": "4.6",
	"Category": "",
	"Description": "",
	"Modules": [
		{
			"Name": "MyGame",
			"Type": "Runtime",
			"LoadingPhase": "Default"
		}
	]
}
  1. Remove the Source folder from your project tree
  2. Remove Binaries/Win64/UE4Editor-MyGame.dll, and the binaries from any other platforms that you may have compiled to

It worked !! I was able to run it on the iPhone. Thank you very much.

For 4.7 or later put this code for this to be work.

     {
    	"FileVersion": 3,
    	"EngineAssociation": "4.11",
    	"Category": "",
    	"Description": "",
    	"Plugins": [
    		{
    			"Name": "GitSourceControl",
    			"Enabled": false
    		},
    		{
    			"Name": "EpicSurvey",
    			"Enabled": false
    		}
    	],
    	"TargetPlatforms": [
    		"Android",
    		"WindowsNoEditor"
    	]

}