How to setup Remote Build?

Hey guys i’m trying to test In App-Purchase feature in my IOS game but since i’m using a PC i think i need to setup remote build so i can sync to a MAC so i can use XCODE to build and test the IAP in my game but i don’t know how to set up Remote Build i have gone far as to install DeltaCopy, Allow Remote in MAC ect. But got stuck in " Generate SSH Key " i click the button but doesn’t do anything.

I read that there’s another way for building and testing app, through a website call “Testflight” but the website is currently down.

If i’m wrong please feel free to correct me, i’m not familiar with XCODE.

This is from modifying this guide a tad: Windows -> iOS Rsync/Remote Build Guide (4.8) - Mobile - Unreal Engine Forums
(As that’s rather outdated and excessive now)



[Mac]

  1. Download and install Xcode

  2. Export cert and provisioning profiles from Xcode

Add your Apple Dev Account in Xcode (Preferences->Accounts)

Xcode > Apple IDs > Details > Provisioning Profiles > “Show in Finder” > Copy .mobileprovision files to folder on PC (or USB stick)

Xcode > Apple IDs > Details > Signing Identities > “Export” > Input password and export .p12 files to folder on PC (or USB stick)

Open Keychain Access, choose the “My Certificates” category, and copy your certificates from “login” to “System”

  1. Go to System Preferences->Sharing and turn on “remote login”

    Make sure you give access for the account you plan to use

[Windows PC]

  1. Make sure you have the source build of UE4 downloaded and setup correctly

  2. Download and install DeltaCopy

    I recommend installing this in the default directory of C:/program files/etc. etc.

    If you don’t you will need to define the location in the project settings under Platforms->iOS->Build->RemoteBuildOptions

  3. Setup your project iOS settings

Go to Edit → Project Settings → iOS → and be sure the project is configured for IOS.

Import the Mobile Provision that we exported earlier. This will be automatically copied to a location in your Documents folder.

Import the Certificate (.p12 that we earlier exported from Xcode), input password. This will register the certificate globally on your PC.

Since the editor copies and registers these files, you can now unplug your USB stick or remove the files you exported earlier.

NOTE:
If importing through the editor doesn’t work, open UE4Directory\Engine\Binaries\DotNET\IOS\IPhonePackager.exe, Find the uproject file for your project, then click the Already Registered tab, and import your certificate through there.

Shut down IPP and restart the editor when done.

Set bundle identifier to com.companyname.yourgame (make sure this matches the string in your mobile provision)

  1. In the same tab, find the Remote Build Options (tiny hidden arrow)

Enter the Remote Server Name (Computer name of the Mac)

Enter the RSync User Name (User name of the Mac)

Press the [Generate SSH Key] button (This and the next sub steps are optional here as this will happen when you attempt to build the ipa anyway)

Enter Yes into the terminal

Enter the password of the Mac computer

Press Enter twice to enter an empty passphrase

Enter the password of the Mac computer again

  1. Finally, Package Project

You can do this by just hitting Package Project → iOS, however I prefer using the project launcher with a custom profile (Launch arrow->project launcher)

If everything goes right, you will have an IPA in the Binaries/iOS folder of your Windows project folder.



I think that should be all the steps to setup for remote building. It’s been a while since i’ve had to do it.

Hope that helps. :slight_smile:

Hey thank for the reply i will try it first thing in the morning, but i got a question…

Do i really need XCODE to test In-App Purchase on my iphone ?

Also do i need to download Unreal from GitHud and setup the engine, compile ect. all over again ?

If you want to remote build, then you need xcode.
Honestly you shouldn’t need to compile the engine to test IAP, but an engine bug is an engine bug.
If you can’t wait for epic to fix it, then you have to fix it yourself.

EDIT: As for needing the github version, If you want to make any modifications to the engine, the source code is REQUIRED.
If you’re using the Epic Launcher version of the engine, most of the source is not included as you’re not supposed to be rebuilding the entirety of the engine. (As it’s already done for you)

if you’re using the epic launcher version, you can’t compile. so yes.
If you’re already using the github version, then this is just modifying that version’s settings.

Thanks for this excellent summary :slight_smile:

In my case, everything worked except for the final IPA signing back on the PC, which failed with:

IPP ERROR: Application exception: System.Security.Cryptography.CryptographicException: The buffer supplied to a function was too small.

To get that last step to work, I had to convert my iOS dev private key to PEM and back to P12 using openssl:

openssl pkcs12 -in ios-dev.p12 -out ios-dev.pem -nodes
openssl.exe pkcs12 -export -in ios-dev.pem -out ios-dev-fixed.p12

So aparently, there’s some private flags in the P12 from Apply which the Epic signing tool doesn’t like, but openssl will happily remove them.

Xcode > Apple IDs > Details > Provisioning Profiles > “Show in Finder” > Copy .mobileprovision files to folder on PC (or USB stick)

This step appears to be wrong. I can’t find Xcode > Apple IDs or anything like Details > Provisioning Profiles under Accounts.

In that case I think I found it, thank you. I went a little different though due to everything Xcode wanted to export being packaged into some non-p12 format:

  1. Use XCode to generate certificate
  2. Go to developers.apple.com and download cert, make provisioning profile
  3. Load them into UE on the windows side.

And of course make sure all certs in the keychain are trusted and if you made any certs today and you’re forward of the US in timezone set your date forward by one day until tomorrow.

Seems to be working. Just doing some test remote builds now, I’ll report back if my information is in fact bad. :slight_smile:

Try looking under Xcode > Preferences > Accounts

From memory Apple moved this in one of the latest XCode versions. Can’t confirm this ATM as I don’t have the login details for the mac here at work.

Let me know if you figure it out. :slight_smile:

So overall it’s still not working for me. I did a source build and it still fails at exactly the same place:

UATHelper: Packaging (iOS):   Picking the default remote server 192.168.178.57
UATHelper: Packaging (iOS):   Doing date +"%s" && sysctl hw.memsize | awk '{print $2}' && sysctl hw.logicalcpu | awk '{print $2}'
UATHelper: Packaging (iOS):   Execute took 00:00:00.0655628
UATHelper: Packaging (iOS):   ERROR: Failed to run init commands on 192.168.178.57. Output =
UATHelper: Packaging (iOS):   ERROR: Failed to initialize a connection to the Remote Server 192.168.178.57

My instinct is to say that sysctl is a linux command so it has no business being run on windows. I can’t even run it in a git bash window, so does UE have some kind of local version of sysctl it can run?

I can SSH in using my keys fine so I’m lost as to why it’s failing to connect. This is as far as I got last time I tried too. Any advice?

My other question is why does it need a source build? No instructions I’ve seen anywhere say to modify anything about it.

You’re correct that sysctl is a UNIX command as that command it plans on running ON the remote server NOT what it’s trying to run on your machine.

I’m not sure why you can SSH manually into the machine, but not using the remote tools. Try double checking 192.168.178.57 is the actual IP of the server, and ping it as a quick test. If the ping fails, from memory the build tool assumes the server doesn’t exist (even if it does) as the build tool uses ping to determine a valid server.

And the reason it needs a source build is you are compiling the binary (and you can’t compile if you don’t have source code) the remote tool copies the source and the various build resources across, compiles it, signs it, and then copies back the final binary. (i.e. the stub)

I’m not sure if you can get it to package/sign correctly if it doesn’t build the binary. I could be wrong, but I never got it to work (This was a while back though)

Ah you mean a “code project”. A source build is when you build the entire editor from source with a modified engine.

It can still do all of the normal tasks on the Mac that it’d do on the PC even if it’s just blueprint-only, but it will also sign it correctly with an App Store provisioning profile which is what the game needs to be sold. That’s the part other than compilation that Windows can’t do. (This is for people following in my footsteps after this wondering why we’re bothering.)

I’ll have a go at pinging it, but the IP is definitely correct and everything’s set up for SSH. There could be some router funkiness going on, it is the main common element here.

No, a code project and source are completely different and I mean Source.
iOS doesn’t support modules (i.e. DLL’s) which is how a code project on Windows works. All your code is compiled into a single binary on iOS.

So if your project is Blueprint ONLY, then you can use the iOS binary shipped with the non source build of the engine. Otherwise you will NEED to compile from source if your project contains code.

I’m not sure if they have changed this recently, but as far as I know Epic have stated they do not support remote compiling code projects from windows (I remember seeing it in a forum post/answerhub from a Dev a while back)

As for pinging, like I said above: Epic’s build tool relies on the Windows ping command. I vaguely remember this is disabled by default on mac’s (I think… I remember having the issue where the build machine was rejecting pings anyway)

Yeah the build targets and binaries delivered differ, but once you add code to a project (or change to a distribution provision) it will need to be compiled in its target environment. That’s what remote build is for obviously, to compile on a mac without leaving a windows dev environment.

You can also modify the engine and build your own engine/editor but that requires you to do it on xcode locally, which is what a source build is. I worry that we’ll confuse people, because it got me. I compiled the engine from source all the time wondering what the purpose of it was.

Anyway getting back to it, the mac definitely responds to ping and the firewall is off. I’ve been as permissive as the router will allow. I might have to start a new question specifically for that. Thanks for your help in eliminating a bunch of things and your original instructions! :slight_smile:

Delta copy is not working on the latest version of windows 10?

[main] rsync 8992 find_fast_cwd: WARNING: Couldn’t compute FAST_CWD pointer.

I get the exact same error with it

I fixed the error by removing the path to the delta copy install. UE4 now ships with deltacopy included so leave the delta copy directory field blank

Hi, FacePalm.exe im trying to package my game in 4.19 on windows and it says i must remote build. I am really having trouble doing this. I have a few questions will it be possible to discuss this over skype or discord.

I’ve sent you a PM in the forums.

For those of you interesting in the official documentation from unreal : Building for iOS on Windows | Unreal Engine Documentation