SecondaryRemoteServerName

SecondaryRemoteServerName

#Overview

name: SecondaryRemoteServerName

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 4 C++ source files. Also referenced in 1 C# build file meaning it may affect the build system logic.

#Summary

#Usage in the C++ source code

The purpose of SecondaryRemoteServerName is to specify the name or IP address of a secondary remote Mac machine used for building iOS applications in Unreal Engine 5. This setting is part of the iOS build system and is used when developers need an additional Mac for building iOS projects remotely.

This setting variable is primarily used by the iOS Target Platform module and the iOS Platform Editor module. It’s a part of the UIOSRuntimeSettings class, which suggests it’s central to the iOS-specific runtime configuration in Unreal Engine 5.

The value of this variable is set in the project’s configuration files, specifically in the section [/Script/IOSRuntimeSettings.IOSRuntimeSettings] of the engine’s INI file (GEngineIni). It can be modified through the project settings in the Unreal Editor, as evidenced by the UPROPERTY macro with the EditAnywhere and GlobalConfig specifiers.

SecondaryRemoteServerName interacts with other iOS-related variables such as SecondaryRSyncUsername, which specifies the username for the secondary remote server. It’s also used in conjunction with the primary RemoteServerName and RSyncUsername variables.

Developers should be aware that:

  1. This variable is only relevant when building for iOS platforms.
  2. It’s used when a secondary Mac is needed for building, which is controlled by the bSupportSecondaryMac flag.
  3. The value can include a port number, separated by a colon (e.g., “192.168.1.100:22”).

Best practices when using this variable include:

  1. Ensure that the specified secondary Mac is accessible and properly configured for iOS builds.
  2. Use a stable IP address or hostname to avoid frequent changes.
  3. If specifying a port, make sure it’s open and configured correctly on the remote Mac.
  4. Keep this setting in sync with your team to ensure consistent build environments.
  5. Regularly validate the connection to the secondary Mac to prevent build failures.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:3012, section: [/Script/IOSRuntimeSettings.IOSRuntimeSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Developer/IOS/IOSPlatformEditor/Private/IOSTargetSettingsCustomization.cpp:1060

Scope (from outer to inner):

file
function     void FIOSTargetSettingsCustomization::BuildSecondaryRemoteMacBuildingSection

Source code excerpt:


	// Remote Server Name Property
	TSharedRef<IPropertyHandle> RemoteServerNamePropertyHandle = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UIOSRuntimeSettings, SecondaryRemoteServerName));

	IDetailPropertyRow& RemoteServerNamePropertyRow = RemoteBuildingGroup.AddPropertyRow(RemoteServerNamePropertyHandle);
	RemoteServerNamePropertyRow
		.ToolTip(RemoteServerNamePropertyHandle->GetToolTipText())
		.CustomWidget()
		.NameContent()

#Loc: <Workspace>/Engine/Source/Developer/IOS/IOSPlatformEditor/Private/IOSTargetSettingsCustomization.cpp:1623

Scope (from outer to inner):

file
function     FReply FIOSTargetSettingsCustomization::OnGenerateSSHKey

Source code excerpt:

	else
	{
		if (Settings.SecondaryRemoteServerName.FindChar(':', colonIndex))
		{
			RemoteServerAddress = Settings.SecondaryRemoteServerName.Left(colonIndex);
			RemoteServerPort = Settings.SecondaryRemoteServerName.RightChop(colonIndex + 1);
		}
		else
		{
			RemoteServerAddress = Settings.SecondaryRemoteServerName;
			RemoteServerPort = "22";
		}
		RSyncUsername = Settings.SecondaryRSyncUsername;
	}

	FString Path = FPlatformMisc::GetEnvironmentVariable(TEXT("APPDATA"));

#Loc: <Workspace>/Engine/Source/Developer/IOS/IOSTargetPlatform/Private/IOSTargetPlatform.cpp:285

Scope (from outer to inner):

file
function     int32 FIOSTargetPlatform::CheckRequirements

Source code excerpt:

	FString CommandLine = FString::Printf(TEXT("Validate Engine -project \"%s\" -bundlename \"%s\" %s"), *ProjectPath, *(BundleIdentifier), (bForDistribtion ? TEXT("-distribution") : TEXT("")) );
	FString RemoteServerName;
	FString SecondaryRemoteServerName;
	FString RSyncUsername;
	FString SecondaryRSyncUsername;
	GConfig->GetString(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("RemoteServerName"), RemoteServerName, GEngineIni);
	GConfig->GetString(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("RSyncUsername"), RSyncUsername, GEngineIni);
	GConfig->GetString(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("SecondaryRemoteServerName"), SecondaryRemoteServerName, GEngineIni);
	GConfig->GetString(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("SecondaryRSyncUsername"), SecondaryRSyncUsername, GEngineIni);
	if (RemoteServerName.Len() == 0 || RSyncUsername.Len() == 0)
	{
		bReadyToBuild |= ETargetPlatformReadyStatus::RemoveServerNameEmpty;
	}

#Loc: <Workspace>/Engine/Source/Runtime/IOS/IOSRuntimeSettings/Classes/IOSRuntimeSettings.h:316

Scope (from outer to inner):

file
class        class UIOSRuntimeSettings : public UObject

Source code excerpt:

    // The name or ip address of the remote mac which will be used to build IOS
    UPROPERTY(GlobalConfig, EditAnywhere, Category = "Remote Build", meta = (EditCondition = "bSupportSecondaryMac", ConfigHierarchyEditable))
    FString SecondaryRemoteServerName;
    
    // The secondary mac users name which matches the SSH Private Key, for remote builds using RSync.
    UPROPERTY(GlobalConfig, EditAnywhere, Category = "Remote Build", meta = (EditCondition = "bSupportSecondaryMac", DisplayName = "Username on Secondary Remote Server", ConfigHierarchyEditable))
    FString SecondaryRSyncUsername;

    // Optional path on the secondary remote mac where the build files will be copied. If blank, ~/UE5/Builds will be used.

#References in C# build files

This variable is referenced in the following C# build files:

Location: <Workspace>/Engine/Source/Programs/UnrealBuildTool/ToolChain/RemoteMac.cs:161

				string IniServerName;

				if ((bIsPrimary ? Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "RemoteServerName", out IniServerName) : Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "SecondaryRemoteServerName", out IniServerName)) && !String.IsNullOrEmpty(IniServerName))
				{
					ServerName = IniServerName;
				}
				else
				{
					throw new BuildException("Remote compiling requires a server name. Use the editor (Project Settings > IOS) to set up your remote compilation settings.");