Remote Connection to Mac doesn't work on 4.13 and iOS 10

UE 4.13,
iOS 10 (for iOS 9.3 it worked),
Source code project (for Blueprint-only project it works!)

On blank C++ project with remote connection to Mac while packaging project I receive error:

UATHelper: Packaging (iOS): UnrealBuildTool: Running SSH on MacMini ... 
UATHelper: Packaging (iOS): UnrealBuildTool: Build settings from command line:
UATHelper: Packaging (iOS): UnrealBuildTool:     CODE_SIGN_IDENTITY = iPhone Developer
UATHelper: Packaging (iOS): UnrealBuildTool:     IPHONEOS_DEPLOYMENT_TARGET = 6.0
UATHelper: Packaging (iOS): UnrealBuildTool:     SDKROOT = iphoneos10.0
UATHelper: Packaging (iOS): UnrealBuildTool: === BUILD TARGET NewSampleProject OF PROJECT UE4_FromPC WITH CONFIGURATION Development ===
UATHelper: Packaging (iOS): UnrealBuildTool: Check dependencies
UATHelper: Packaging (iOS): UnrealBuildTool: NewSampleProject requires a provisioning profile. Select a provisioning profile for the "Development" build configuration in the project editor.
UATHelper: Packaging (iOS): UnrealBuildTool: Code signing is required for product type 'Application' in SDK 'iOS 10.0'
UATHelper: Packaging (iOS): UnrealBuildTool: ** BUILD FAILED **
UATHelper: Packaging (iOS): UnrealBuildTool: The following build commands failed:
UATHelper: Packaging (iOS): UnrealBuildTool:   Check dependencies
UATHelper: Packaging (iOS): UnrealBuildTool: (1 failure)
UATHelper: Packaging (iOS): UnrealBuildTool: Execute took 00:00:08.3870359
UATHelper: Packaging (iOS): UnrealBuildTool: IPP ERROR: RPCCommand MakeApp failed with return code Error_RemoteCertificatesNotFound

but provision and certificate are valid!

And directly on Mac it works so the only problem is with Rsync.

So I also had this issue, and found a temporary solution.

Note that this is not a final solution, as this change breaks distro signing, but it got me up and running again.

TEAM_ID should be replaced with the identifier you can find in the provisioning profile. (E.G. if the full ID in the profile is ‘ABCDEFGHIJK.com.CompanyName.GameName’ then it will be ABCDEFGHIJK)

Have a massive code block:

// Engine\Source\Programs\UnrealBuildTool\System\XcodeProject.cs

private void AppendProjectSection(StringBuilder Content, string TargetName, string TargetGuid, string BuildTargetName, string BuildTargetGuid, string IndexTargetName, string IndexTargetGuid, string MainGroupGuid, string ProductRefGroupGuid, string ProjectGuid, string ProjectBuildConfigGuid)
		{
			Content.Append("/* Begin PBXProject section */" + ProjectFileGenerator.NewLine);

			Content.Append("\t\t" + ProjectGuid + " /* Project object */ = {" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\tisa = PBXProject;" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\tattributes = {" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\tLastUpgradeCheck = 0700;" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\tORGANIZATIONNAME = \"Epic Games, Inc.\";" + ProjectFileGenerator.NewLine);
#if true // UG_CHANGE
			Content.Append("\t\t\t\tTargetAttributes = {" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\t\t" + TargetGuid + " = {" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\t\t\tCreatedOnToolsVersion = 8.0;" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\t\t\tDevelopmentTeam = TEAM_ID;" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\t\t\tProvisioningStyle = Automatic;" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\t\t};" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\t};" + ProjectFileGenerator.NewLine);
#endif // END UG_CHANGE
            Content.Append("\t\t\t};" + ProjectFileGenerator.NewLine);

...........
 					Content.Append("\t\t\t\t\"TARGETED_DEVICE_FAMILY[sdk=iphoneos*]\" = \"" + IOSRunTimeDevices + "\";" + ProjectFileGenerator.NewLine);
 					Content.Append("\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";" + ProjectFileGenerator.NewLine);
 					Content.Append("\t\t\t\t\"SDKROOT[sdk=iphoneos]\" = iphoneos;" + ProjectFileGenerator.NewLine);
#if true // UG_CHANGE
					//Content.Append("\t\t\t\t\"PROVISIONING_PROFILE[sdk=iphoneos*]\" = \"\";" + ProjectFileGenerator.NewLine);

#endif // END UG_CHANGE
                 }
                 if (TVOSRunTimeVersion != null)

........

			Content.Append("\t\t\t\tMACOSX_DEPLOYMENT_TARGET = " + MacToolChain.MacOSVersion + ";" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\tSDKROOT = macosx;" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\tGCC_PREFIX_HEADER = \"" + UE4Dir + "/Engine/Source/Editor/UnrealEd/Public/UnrealEd.h\";" + ProjectFileGenerator.NewLine);
#if true // UG_CHANGE
			Content.Append("\t\t\t\tDEVELOPMENT_TEAM = TEAM_ID;" + ProjectFileGenerator.NewLine);
#endif // END UG_CHANGE
            Content.Append("\t\t\t};" + ProjectFileGenerator.NewLine);

..........

			Content.Append("\t\t\t\tUE_BUILD_TARGET_NAME = \"" + Config.BuildTarget + "\";" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\t\tUE_BUILD_TARGET_CONFIG = \"" + Config.BuildConfig + "\";" + ProjectFileGenerator.NewLine);
#if true // UG_CHANGE
			Content.Append("\t\t\t\tDEVELOPMENT_TEAM = TEAM_ID;" + ProjectFileGenerator.NewLine);
#endif // END UG_CHANGE
			Content.Append("\t\t\t};" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t\tname = \"" + Config.DisplayName + "\";" + ProjectFileGenerator.NewLine);
			Content.Append("\t\t};" + ProjectFileGenerator.NewLine);

This relies on automatic signing to sign the IPA, which isn’t ideal. (As it doesn’t let you sign specifically with the Distro certificate)
We’re currently working on a better solution which uses manual signing, however this should get you up and working again.

Hope that helps. :slight_smile:

EDIT: As @gameDNA studio mentions in his answer if this doesn’t work at first, use the TEAM_ID from your Distro profile.

Unfortunately it doesn’t helped me :frowning:

This continues on from a PM convo, as @gameDNA studio no longer has space in their PM box. (And I have no idea how to contact them outside of that.)

I guess an explanation is required:

The part that is failing is the signing of the binary on the mac using the xcode project that UE4 generates.

specifically this command:

/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project UE4_FromPC.xcodeproj -configuration "Development" -target 'GAMENAME' -destination generic/platform=iOS -sdk iphoneos CODE_SIGN_IDENTITY="iPhone Developer" IPHONEOS_DEPLOYMENT_TARGET="6.0"

Unreal signs the stub ipa before sending it back to your PC, which because Apple changed the signing process in XCode 8.0, now fails.
Remote building is the only time this project gets used.

Have a look at: /Users/USERNAME/UE4/Builds/PATH/TO/GAME/GAMENAME/Binaries/IOS/UE4_FromPC.xcodeproj

This is the project that gets generated.

What you’ll have to do next is show the UE4_FromPC.xcodeproj package contents, create a copy of project.pbxproj somewhere, then open UE4_FromPC.xcodeproj, go to the general settings of the target and turn on managed signing and make sure it’s automatic.

Then diff the old and new versions of the project.pbxproj file and replicate the differences in the Engine\Source\Programs\UnrealBuildTool\System\XcodeProject.cs file

Make sure you use the correct UID’s if you add a section.

the tl;dr is it’s not the certificates that are the issue, but the generated project.

Have fun figuring it out. :stuck_out_tongue:

Still doesn’t work :frowning: But interesting is that UE4_FromPC.xcodeproj directly on Mac also doesn’t package… But if I create new Xcode sample project with the same identifier and provision profile it works… So it’s definitely a problem with generating Xcode project by UE4.

OK, I investigated issue.

Indeed changes by FacePalm.exe (thank you!) to XcodeProject.cs works… I previously provided development TEAMID because I was doing dev build… but it looks like it should be always production TEAMID even if you are packaging build for dev…

Still this is only workaround because it requires modyfiying code (problem exists also in Launcher engine version) and moreover TEAMID is hardcoded…

So Epic please fix this ASAP because this issue is critical for iOS devs with Rsync enabled.

Thank you.

Same here. Xcode 8 has broken remote build.

Hey everybody,

I was able to recreate the issue and submitted a issue report for it. You can follow it here:

https://issues.unrealengine.com/issue/UE-36149

There is also a couple more issues related to improving the remote building system as a whole.

This is fixed in 4.13.1 which is due out this week. Including distribution signing issues.

-Pete

For those merging individual fixes, here is the specific change list:

https://github.com/EpicGames/UnrealEngine/commit/ffddf955a4f9771e2c33e933902321a54276b2c4

which difference are you talking about FacePalm.exe in project.pbxproj file.