You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
285 lines
12 KiB
Plaintext
285 lines
12 KiB
Plaintext
Availability: Public
|
|
Title: Advanced iOS PC/Mac Workflow
|
|
Crumbs:%ROOT%, Platforms, Platforms/iOS
|
|
Description:Setting up for development for the iOS platform.
|
|
prereq:Platforms/iOS/QuickStart
|
|
|
|
[TOC(start:2 end:2)]
|
|
|
|
%Globals:OSSelect%
|
|
|
|
## Overview
|
|
|
|
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]
|
|
|
|
<!--
|
|
[EXCERPT:WindowsConfig]
|
|
|
|
See the [Recommended Specifications](GettingStarted/RecommendedSpecifications) page for detailed information about Windows system requirements.
|
|
|
|
[/EXCERPT:WindowsConfig]
|
|
|
|
|
|
[EXCERPT:MacOSConfig]
|
|
|
|
See the [Recommended Specifications](GettingStarted/RecommendedSpecifications) page for detailed information about Mac system requirements. Note that to deploy to iOS 7.1, you will need to install XCode 5.1.
|
|
XCode is [available as a free download](https://itunes.apple.com/us/app/xcode/id497799835?mt=12) on the App Store.
|
|
|
|
[/EXCERPT:MacOSConfig]
|
|
-->
|
|
|
|
|
|
|
|
## 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]
|
|
|
|
<!--
|
|
[EXCERPT:WindowsSetup]
|
|
|
|
To get your certificate on Windows, you will need to use iPhone Packager, located in `Engine\Binaries\DotNET\IOS`.
|
|
|
|
There are two tabs in iPhone Packager:
|
|
* New User
|
|
* Already a registered iOS developer
|
|
|
|
The New User tab contains tools for developers who have not developed iOS applications previously.
|
|
|
|
Here, you can:
|
|
* Open the Generate Certificate Request Window. The Generate Certificate Request window generates a key pair for signing your iOS applications and a certificate request that is used to generate a certificate on Apple's Developer website.
|
|
* Import a provisioning profile downloaded from Apple's Developer website.
|
|
* Import a development certificate and key pair downloaded from Apple's Developer website.
|
|
|
|
[REGION:warning]
|
|
There is an option to open the Edit Info.plist window, but this is an old option that is no longer needed. Eventually, the functionality of iPhone Packager is going to be integrated into Unreal Editor.
|
|
[/REGION]
|
|
|
|
The Already a Registered iOS Developer tab contains tools for developers who have previously developed iOS applications, either using Unreal or through other methods, and already have a development certificate and provisioning profile.
|
|
|
|
Here, you can:
|
|
* Import a provisioning profile downloaded from Apple's Developer website.
|
|
* Import a development certificate and key pair previously downloaded from Apple's Developer website or a .p12 file exported from Keychain Access.
|
|
|
|
When installing your certificate, the default options in the wizard should work for most cases.
|
|
|
|
[/EXCERPT:WindowsSetup]
|
|
|
|
|
|
[EXCERPT:MacOSSetup]
|
|
|
|
|
|
Now you will need to install the certificate on your Mac, as explained on the web site. You will also need to install that certificate on all the Macs in your studio that will be used to sign applications. There are two ways to do this:
|
|
|
|
|
|
* With Keychain Access application:
|
|
* Select the login keychain.
|
|
* Select My Certificates in the Category section.
|
|
* Select the new certificate (it will start with "iPhone Developer").
|
|
* Right-click on it, and select Export.
|
|
* Follow the prompts (empty password is fine if you store it securely).
|
|
* Give out the .p12 to others.
|
|
* They can then double-click it, or drag the .p12 in to Keychain Access, to install the certificate in their login keychain.
|
|
* With Xcode:
|
|
* Go to Organizer.
|
|
* Go to Developer Profile on the bottom left.
|
|
* Select Export Developer Profile.
|
|
* Follow the prompts (including entering password - use something you can share with your team).
|
|
* Give out the profile file to others.
|
|
* They can then Import Developer Profile in their Xcode's organizer.
|
|
|
|
Next, download the `.mobileprovision` from the Apple site. It will download a file called <ProfileName>.mobileprovision. You should place your `.mobileprovision` file in one of the following locations:
|
|
* `[GameDir]/Build/IOS/[GameName].mobileprovision`
|
|
* `Engine/Build/IOS/UE4Game.mobileprovision`
|
|
|
|
|
|
[/EXCERPT:MacOSSetup]
|
|
-->
|
|
|
|
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.
|
|
|
|
## Windows system setup
|
|
|
|
* Set up environment variables (or modify the code in RemoteToolchain.cs so you can share a single Mac for everyone).
|
|
* ue.RemoteCompileServerName = The DNS name or IP address of the Mac used for compiling (e.g. a1012).
|
|
* ue.IOSSigningServer = This is optional (when compiling, the package will force the same as ue.RemoteCompileServerName, but if you run IPhonePackager.exe on its own, this will determine the Mac to use if -mac is not specified).
|
|
|
|
The reason for two sets of environment variables is to enable completely separate compiling and signing servers. You may need to restart your computer for these changes to take effect.
|
|
|
|
|
|
### 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 <GameName> - 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] |