Availability: Docs Title: Advanced iOS PC/Mac Workflow Crumbs:%ROOT%, Platforms, Platforms/iOS Description:Setting up for development for the iOS platform. prereq:Platforms/iOS/QuickStart Version: 4.9 SkillLevel: Intermediate parent:Platforms/iOS order:0 type:overview [TOC(start:2 end:2)] %Globals:OSSelect% This document explains how to set up your development environment for compiling for iOS devices, as well as general workflows for deploying an Unreal project that targets the iOS platform. [PUBLISH:Rocket] [REGION:note] Currently, if you are using the launcher version of Unreal Engine, you can only deploy from Windows to iOS for Blueprints-based projects. [/REGION] [/PUBLISH] ## Devices / SDK UE4 runs on IPhone4/IPad2 or later, running iOS 6.0 or above. To check the compatibility of your device with engine features, please see the [](Platforms\iOS\DeviceCompatibility) page. ## Supported Configurations [OBJECT:ToggleButtonContent] [PARAMLITERAL:category] OS [/PARAMLITERAL] [PARAMLITERAL:id] windows [/PARAMLITERAL] [PARAMLITERAL:active] active_button_content [/PARAMLITERAL] [PARAM:content] [INCLUDE:#WindowsConfig] [/PARAM] [/OBJECT] [OBJECT:ToggleButtonContent] [PARAMLITERAL:category] OS [/PARAMLITERAL] [PARAMLITERAL:id] mac [/PARAMLITERAL] [PARAMLITERAL:active] [/PARAMLITERAL] [PARAM:content] [INCLUDE:#MacOSConfig] [/PARAM] [/OBJECT] ## Getting Started as an Apple iOS Developer You will need to sign up for the [Apple IOS Developer Program](https://developer.apple.com/programs/ios/). * Individual - If you are working on your own, or will be the only one on a small them that needs Admin access to the IOS account * Company - If you are a small team with Company / This allows you to add people to your team, and grant them different kinds of access When you create your Apple developer account, you will have to do the following (using Apple's instructions): * Create a certificate. * Create an App ID (it is fine to use * for the user specified portion). * Create a provisioning profile. * Add your devices. * Add all of your devices to the provisioning profile. For more information, please see the following pages on Apple's site: * [App Distribution Guide](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40012582-CH1-SW1) * [Maintaining Identifiers, Devices, and Profiles](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingProfiles/MaintainingProfiles.html#//apple_ref/doc/uid/TP40012582-CH30-SW1) * [Launching Your App on Device](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html#//apple_ref/doc/uid/TP40012582-CH27-SW4) [OBJECT:ToggleButtonContent] [PARAMLITERAL:category] OS [/PARAMLITERAL] [PARAMLITERAL:id] windows [/PARAMLITERAL] [PARAMLITERAL:active] active_button_content [/PARAMLITERAL] [PARAM:content] [INCLUDE:#WindowsSetup] [/PARAM] [/OBJECT] [OBJECT:ToggleButtonContent] [PARAMLITERAL:category] OS [/PARAMLITERAL] [PARAMLITERAL:id] mac [/PARAMLITERAL] [PARAMLITERAL:active] [/PARAMLITERAL] [PARAM:content] [INCLUDE:#MacOSSetup] [/PARAM] [/OBJECT] In the end, the important thing is that everyone has the same "iPhone Developer:" certificate in their login Keychain. You can share a wildcard mobileprovision file across all your games (until a game needs a non-wildcard profile as explained by Apple). Remember to update the file(s) whenever you add more devices. ## Deploying to iOS Devices You can use the **Launch** button within Unreal Editor to quickly begin testing your current level on iOS devices. You can also use the **File > Package** command to cook and package your game for testing on iOS devices. For more information, see the [](Engine\Deployment\Launching) page. [PUBLISH:Licensee] ## Windows-based Workflow for Code Projects Read this section if you are going to do your main development and coding on Windows. ### Mac system setup * Install the latest Xcode from the App Store. * Create needed directory structure, using the Terminal application. * Make some directories that you can write to: * sudo mkdir /UE4 * sudo chmod 777 /UE4 * You could also make it in your home directory, and then create a link to them: * ln -s ~/UE4 /UE4 * Install and run UnrealRemoteTool (URT). * Get the program to your Mac. Either A or B: * A) * Copy UnrealRemoteTool from your PC (//depot/UE4/Engine/Build/iOS/UnrealRemoteTool) to your Mac. * chmod a+x UnrealRemoteTool * B) * Sync it from p4v directly to the Mac * Run UnrealRemoteTool from Terminal (there have been rare crashes in URT that have not been caught in a debugger, so we run it in a loop). * for (( ;; )) ; do ./UnrealRemoteTool; done * Note that in Mountain Lion, Terminal will remember the working directory and command history, so if you reboot, an up-arrow should recall the command. ### Compiling on Windows Once you have completed the above steps for setting up your Windows and Mac systems, compiling should be straightforward, as it uses UnrealBuildTool to perform compilation: * Run //depot/UE4/GenerateProjectFiles_AllPlatforms.bat * Open the UE4.sln it creates. * Open the Games solution folder. * Select the Development Editor configuration, and Win64 platform. * **Right-click** on the game of choice (QAGame, for instance) and select Build. * Now, select the Development configuration, and IOS platform. * Again, build your game. * This will connect to your Mac running UnrealRemoteTool, copy files over, and then run remote compilation commands on the Mac. * It will also perform some signing at the end, so make sure that is working correctly. If not, double check the provision file and the certificate installed on the Mac. * Start the cooker. * In the UE4/Engine/Binaries/Win64 directory (in cmd.exe), run this (replacing QAGame with whatever your game is): * ue4editor-cmd QAGame -run=cook -targetplatform=ios -cookonthefly * This will start up a cooking server that the IOS device will talk to over the network to retrieve cooked files. You can look on your Mac drive in the /UE4/Builds directory will have a directory named with your PC's computer name. Inside of there is a mirrored directory structure that matches your PC directory structure. When the compile finishes, the executable will be in the game's Binaries directory (or Engine/Binaries if you compiled the game-less UE4 project) ### Running/Debugging with Xcode Now, to run on device, go over to your Mac: * In /UE4/Builds/.../UE4/Engine/Binaries/IOS, open UE4_FromPC.xcodeproj * Select your game's target (like QAGame_RunIOS) * Edit the launch settings. * Hit Option-Command-R * Under Arguments, add any commandline arguments you need, and also * -filehostip=xx.xx.xx.xx * where xx.xx.xx.xx is the IP address of your PC that is running the cooker. * Click on Run and it will install the game to the device, and then start it running where the game will connect to the PC cooker (you should see some connection messages in the cooker output). ## Mac-based Workflow You can compile for IOS on a Mac. This is pretty new, so is more likely to have issues: ### Compiling and running * Run //depot/UE4/GenerateProjectFiles_AllPlatforms.command * In Xcode, open UE4/UE4.xcodeproj * Select the QAGame - Mac. * In the scheme (Option-Command-R) select Development, then click done. Command-B to build the Mac executable. * Run the IOS cooker from Terminal. * Launch Terminal.app and cd to the UE4/Engine/Binaries/Mac directory, then run this (replacing QAGame with whatever your game is): * open UE4Editor.app --args QAGame -run=cook -targetplatform=ios -cookonthefly * Select - IOS (Run) target, and select a device to run it on. * In the scheme (Option-Command-R), select Development in Info, and then go to Arguments. * Add any necessary commandline options for your game, and also * -filehostip=xx.xx.xx.xx * where xx.xx.xx.xx is the IP address of your Mac that is running the cooker. ## Packaging If you want to prepackage a build, see the UnrealFrontend documentation for how to make a .ipa with all content cooked into it. [/PUBLISH:Licensee]