I’ve been working on putting together a detailed step by step directions on how to use the Unreal’s engine remote tool to develop for iOS on Windows (for Code based apps).
This feature is currently not officially supported but the tools are there if you are building from github. If you have been attempting to do this yourself, you may have been pointed to or found this link: Steps for IOS build with UnrealRemoteTool - UE4 AnswerHub. This has most of the steps, but it’s still missing some and I wanted to create something a little more clear for new people, and provide a place to discuss them.
In order to use the remote tool and develop for iOS on Windows you will need a Mac to build the code for your app. This can be really useful if for example your PC is much more powerful than your Mac. Its also cheaper to build a new PC then it is to get a new Mac of the same performance in many cases. I have an old Macbook Pro, and it can run the editor, but not nearly as well as my PC.
- Open a terminal window on your Mac, and cd to the root directory.
- Create a new directory called UE4 at the root directory. (sudo mkdir UE4)
- Make sure the permissions are set for the new directory. (sudo chmod 777 UE4)
- Get the 4.2 Release Source Code from Github and put it in the UE4 directory you just created. (git clone --url of your fork here–)
- Run the UnrealRemoteTool you can find it under Engine\Build\IOS. (Note: If you can’t get it to run, try chmod a+x to make sure its permissions are set to execute).
- The UnrealRemoteTool could crash, so you can run it in a loop if you don’t want to watch it in the terminal type
for (( ; ; )) ; do ./UnrealRemoteTool; done
You can also save that in a shell script (.sh) to run again easily later.
- You also need to be sure you have installed xcode, created your developer certificate and a mobile provision. I won’t go through these steps here, as you can find much better information about this any where on the web.
- After you have done all the above, we need to export our developer certificate, and its private key. You can do this by opening the keychain access, finding the developer certificate you created, and its corresponding private key and exporting each one, save the file somewhere you can get it (like a thumb drive) while your at it put your mobileprovision file on it. We will need all these later on the PC.
Now what? Now the Unreal Remote Tool is listening for commands to be sent to it. The next step is configure the Unreal Engine on the Windows side.
- Create a directory at the root of your drive called UE4 just as you did on the Mac.
- Clone the same fork 4.2 Release here. You will also need to be sure to download the two Required file zips and extract them in the appropriate folders.
- Create a new file in the same directory as the Engine folder and name it UE4Games.uprojectdirs. Put ‘./’ in it (without the quotations).
- Run the GenerateProjectFiles.bat
- Open the XML file in Engine\Programs\UnrealBuildTool called BuildConfiguration.xml
- In here we will configure the Build tool to know what server the Remote Tool is running on. Add the following under the configuration section:
RemoteToolChain> <PotentialServerNames> <Item>AlternativeServer</Item> </PotentialServerNames> <RemoteServerName>MacServerName</RemoteServerName> </RemoteToolChain>
Replace MacServerName with the name of your MAC machine name.
- Now open the configuration file for IPhonePackager, iphonepackager.exe.config and add the following section to the runtime: <loadFromRemoteSources enabled=“true”/>
- Now open \Engine\Build\IOS\ directory. Put your mobileprovision file in here. Rename it UE4Game.mobileprovision (Not sure if this rename part is necessary, I just do it for consistency).
- Now in the same directory open the The UE4Game-Info plist, find the CFBundleURLName. You need to change this to match the conditions set by your mobileprovision. For example, your mobileprovision might be defined as follows: com.coolawesomegames.*. That means your bundle could be anything, as long as it starts with ‘com.coolawesomegames.’ (CAREFUL HERE, sometimes when editing a file like this, you may accidentally change the encoding, this can cause issues later when loading the XML file. The encoding should be UTF-8 without a BOM. If you find later that the Build fails because of an error on the first line, position 1, this would be a good place to look first. Notepad++ makes it easy to specify the encoding before saving to ensure you are saving it in the correct encoding).
- Now we need to install the certificate and private key we got earlier from the MAC on to our PC. Put the files on your computer somewhere. Run the exe MMC, you can find it by searching for it. Click file at the top 'Add Remove Snap In’s, Add the Certificate Snap in, and choose the ‘My User Account’ setting and confirm. Now you should see a list of folder looking things on the left. Click the one called ‘Personal’ right click somewhere and click ‘All Tasks -> Import’. Now follow the wizard and import your certificate. After that’s complete, repeat that process only import the private key this time.
- Finally, open the UE4 solution and build it.
- Open the UE4Editor.exe found in the WIN64 binaries.
- Create a new code base project, be sure to uncheck the ‘Include Starter Content’.
- Edit -> Project Settings -> iOS -> and be sure the project is configured for IOS.
- Now Package Project-> iOS
- Wait for it…and if everything goes right, you will have a fresh IPA in the Binaries/iOS folder of your project folder. It can take a while to build, as it has to upload everything to your mac and build it.
- Install the IPA and test it.
And that’s it! I haven’t gotten this to work for content only applications yet. I get an error about a missing UE4Game.stub, but you can add code to a content base project to turn into a code based one (you don’t need to do anything with the code). I did this with Tappy Chicken and was able to create an IPA using the steps above.
If anyone encounters any error with the step above, feel free to post it here, it may have been one I’ve seen before because trust me I’ve seen a lot to get to this point! Lastly, only 4.2 was I able to get this to work, github version.