UE4_Remote_Build

本文详细介绍如何设置远程iOS打包环境,包括Mac与Windows机器配置、证书与描述文件管理、使用Unreal Engine进行同步及常见错误排查等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

Setting up remote build machine

The iOS can be built only on iMac machines. We can do it remotely, but the physical machine is required.

Basics

Make sure the user name is setup and it’s password protected (withoud password the ssh remote control won’t be possible). The user name can’t have spaces and special characters!

In Settings enable the Remote Login and Remote Management.settingupiosenviro1

Certificates

First of all, to make certificate valid, you must download the Apple Worldwide Developer Relations Certification Authority certification and import it to the Keychain (it MUST be added by import!).

After that install your development certificate to the Keychain too.

Make sure the imported certificate has “This certificate is valid” status.

Then double click on the key paired with your certificate, select “Get Info” option and make sure the “Allow all applications to access this item” is selected.

settingupiosenviro2

RSync

Unreal Engine uses RSync for syncing files with remote machine.

Make sure you are an administrator on your Mac. You may need to use sudo to create some of the files below.

Download rsync.plist and copy it to: /Library/LaunchDaemons/rsync.plist

Make sure the permissions of the file are rw-r–r–

You can check if launchd is loading the module correctly by running:

sudo launchctl load `/Library/LaunchDaemons/rsync.plist`

1

sudo launchctl load `/Library/LaunchDaemons/rsync.plist`

Create a new file: /etc/rsyncd.conf

[root] path = / hosts allow = 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24 uid = root gid = wheel read only = false comment = Root volume

1

2

3

4

5

6

7

[root]

path = /

hosts allow = 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24

uid = root

gid = wheel

read only = false

comment = Root volume

Hosts are the ip addresses that can use this machine as the build machine. In this scenario, they are all machines with ip: 192.168.0.x, 192.168.1.x and 192.168.2.x (they are all local network addresses).

Make sure the permissions of the file are rw-r–r–

Restart machine.

Setting up Windows

Setting up DeltaCopy

To use RSync on Windows you must install the DeltaCopy to the C:\DeltaCopy\ directory
Run the DeltaC.exe and setup it. The name of the profile must be the same as the name of the user name on Mac.
settingupiosenviro3

Preparing the project for building on remote machine

Make sure that this option in DefaultEngine.ini is set

[/Script/IOSRuntimeSettings.IOSRuntimeSettings] bUseRSync=True

1

2

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]

bUseRSync=True

Then in the Editor in Project Settings – iOS fill the Remote Build Options section.

Fill the correct ip address of the remote builder, the path to the DeltaCopy and the user name the same as specified in the DeltaCopy.

settingupiosenviro4

Press Generate SSH key.

If it will ask if You are sure to connect, type yes!

settingupiosenviro5

Then process with the instructions from the console. Left the phassphrase empty!

If for some reason You have an error like this, it means that the key couldn’t be copied.

settingupiosenviro6

You can still do this manually. Simply copy the

~/.ssh/RemoteToolChainPrivate.key

1

~/.ssh/RemoteToolChainPrivate.key

from Mac to

c:\Users\User\AppData\Roaming\Unreal Engine\UnrealBuildTool\SSHKeys\[ip_address]\[username]\RemoteToolChainPrivate.key

1

c:\Users\User\AppData\Roaming\Unreal Engine\UnrealBuildTool\SSHKeys\[ip_address]\[username]\RemoteToolChainPrivate.key

for example:

c:\Users\User\AppData\Roaming\Unreal Engine\UnrealBuildTool\SSHKeys\192.168.0.178\user\RemoteToolChainPrivate.key

1

c:\Users\User\AppData\Roaming\Unreal Engine\UnrealBuildTool\SSHKeys\192.168.0.178\user\RemoteToolChainPrivate.key

Setting up provisioning and certificate

In the Editor in Project Settings – iOS fill the Bundle Information section.
bundles
Run the: Engine\Binaries\DotNET\IOS\IPhonePackager.exe

In this application select the uproject file of your game, then import provisioning and certificate. Then click Ready for Package.

settingupiosenviro8

You can check if provisioning and certificate has been properly imported in Project Settings – iOS section (Mobile Provision category)

If there are any problems with provisioning you can try to remove currently imported ones. They are located in following directory:

c:\Users\user\AppData\Local\Apple Computer\MobileDevice\Provisioning Profiles

1

c:\Users\user\AppData\Local\Apple Computer\MobileDevice\Provisioning Profiles

Building for iOS

With all those steps done the Engine and the Game is ready to build for iOS. Simply set Development iOS target in the Visual Studio and Build the Game. Or, you can build it via Unreal Frontend too.

Common issues

When receiving an error:

UnrealBuildTool: IPP ERROR: RPCCommand MakeApp failed with return code Error_RemoteCertificatesNotFound

1

UnrealBuildTool: IPP ERROR: RPCCommand MakeApp failed with return code Error_RemoteCertificatesNotFound

Make sure you have proper provisioning and the certificate is installed on the build machine. Also check logs over this line for more detailed informations.


When deploying to iOS fails at 40% with the message:

There is a problem with the entitlements for this application (0xE8008016).

1

There is a problem with the entitlements for this application (0xE8008016).

Make sure the provisioning profile supports the device you are trying to install to.


When receiving an error like:

Failed to run init commands on 192.168.0.178. Output = /cygdrive/c/Users/User/.ssh/config: line 2: Bad configuration option: KexAlgorithms /cygdrive/c/Users/User/.ssh/config: terminating, 1 bad configuration options

1

2

Failed to run init commands on 192.168.0.178. Output = /cygdrive/c/Users/User/.ssh/config: line 2: Bad configuration option: KexAlgorithms

/cygdrive/c/Users/User/.ssh/config: terminating, 1 bad configuration options

Check the C:/%UserProfile%/.ssh/config for any lines that starts with KexAlgorithms and remove it.


When building the compiler cannot find basic headers like string or sockets make sure you’ve run xcode-select –install command on build machine.


When deploying to iOS there is an error:

DeploymentServer: Install \ Update of "MyGame.ipa" failed with Missing Bundle Identifier Error

1

DeploymentServer: Install \ Update of "MyGame.ipa" failed with Missing Bundle Identifier Error

Check if your ipa file has the correct bundle id in Info.plist


When building there is an error like:

UnrealBuildTool: IPP ERROR: Failed to copy file to C:\MyGame\Intermediate\IOS-Deploy\MyGame\Development\..\XcodeSupportFiles\MyComputer_UE4Temp.mobileprovision and there are no more retries!

1

UnrealBuildTool: IPP ERROR: Failed to copy file to C:\MyGame\Intermediate\IOS-Deploy\MyGame\Development\..\XcodeSupportFiles\MyComputer_UE4Temp.mobileprovision and there are no more retries!

You probably abort the IPhonePackager tool in the middle of the previous build. Try to run it once again.


When building there is an error that looks like:

1 [main] rsync 8772 child_copy: linked dll data write copy failed, 0x6F8000..0x6F8008, done 0, windows pid 8772, Win32 error 998

1

1 [main] rsync 8772 child_copy: linked dll data write copy failed, 0x6F8000..0x6F8008, done 0, windows pid 8772, Win32 error 998

According to this page there might be a dll override in Cygwin. Try to restart Windows.


When building there is an error that looks like:

UnrealBuildTool: ERROR: System.IO.IOException: File exists. UnrealBuildTool: UnrealBuildTool: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) UnrealBuildTool: at System.IO.Path.InternalGetTempFileName(Boolean checkHost) UnrealBuildTool: at UnrealBuildTool.RemoteToolChain.PreBuildSync()

1

2

3

4

5

UnrealBuildTool: ERROR: System.IO.IOException: File exists.

UnrealBuildTool:

UnrealBuildTool:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

UnrealBuildTool:    at System.IO.Path.InternalGetTempFileName(Boolean checkHost)

UnrealBuildTool:    at UnrealBuildTool.RemoteToolChain.PreBuildSync()

The Temp directory on Windows is full. Clean up the Temp directory.

 

 

    按照上面的步骤试了两天,遇到了很多问题,最终解决,可以成功打包。

需要注意的是:

 

1.remote bulid最终是以Windows上的证书和描述文件来给IPA进行签名的,所以要求Mac上面不需要安装描述文件,只需要在系统KeyChain下面Import和Windows上一样的证书和Apple Worldwide Developer Relations Certification Authority 证书。

 

2.Windows上面的证书和描述文件要用Engine\Binaries\DotNET\IOS\IPhonePackager.exe进行导入。

 

3.如遇到cer证书无法给IPA签名的情况

UATHelper: Packaging (iOS):   Code Signing Error: Signing certificate is invalid. Signing certificate "iPhone Developer:xxxxxxxxx, is not valid for code signing. It may have been revoked or expired.

删除电脑上所有的证书和描述文件(Windows&MAC)重新导入,保证电脑上只有一个证书和一个描述文件!!!

 

 

4.远程打包AR面部捕捉app(ue4.20),打包失败,需要将MAC系统升至10.3.6以上,并且更新Xcode版本至10.0以上即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值