Hello UE4 community,
I am having a horrible time getting remote building to work for an iOS game (I was hoping to submit yesterday). Please help me. I’m losing my mind.
Scenario:
- UE4.20 on Windows 10 / Max OS X 10.12.6 / Paid Apple Developer account
- Certificates mobile provisions valid and working for local (not remote) iOS packaging
- Prior to this issue I have been packaging and deploying my game .ipa to my iPad (ios12) happily / successfully many times
- Issue has been introduced after needing to remote build due to adding iOS icons (.png) to Project Settings > Platforms > iOS > Required Icons.
- SSH / Remote rsync commands appear to be working okay. I’m not seeing SSH Key errors.
- I can revert to successful packaging by removing the icons and the remote build settings then removing the Saved, Intermediate, Build and Binaries folders from my project (I do this to clear out problematic iOS packaging issues).
TL:DR
- CAN package for iOS and deploy .IPA file to a connected iPad WITHOUT remote build / Required icons
- CANNOT package for iOS using remote build due to an IPP cryptography exception (keyset does not exist)
My Interpretation
I understand this issue to be caused by the Mac not having the appropriate certificates / key pair installed or trusted or something. I have been trying everything I have found on UE4 Answer Hub related to sorting these certs out, to no avail.
Certificate Method:
I have been creating and installing certificates (and device mobilprovisions) on the PC using \Engine\Binaries\DotNET\IOS\IPhonePackager.exe and the Apple Developer portal. These have worked for all local packaging tasks.
I am confused about how to create / import / manage the certificates & keys on the Mac using XCode / Keychain.
I find it very confusing knowing what certificate XCode installs when I sign in. Keychain makes it look like I don’t have a private key (in mac compatible format) for the correct certificate. I have the .key file for the certificate on the PC side but that appears to be a different format.
Error Message:
UATHelper: Packaging (iOS): .. Provision entry SN '0xxxxxxxxxxxxx3' matched 1 installed certificate(s)
UATHelper: Packaging (iOS): .. .. Installed certificate 'iPhone Developer: Wxxxxm Mxxxs (xxxxxxxxxxx)' is valid (choosing it) (range '17/12/2018 9:40:49 PM' to '17/12/2019 9:40:49 PM')
UATHelper: Packaging (iOS): IPP ERROR: Application exception: System.Security.Cryptography.CryptographicException: Keyset does not exist
PackagingResults: Error: Application exception: System.Security.Cryptography.CryptographicException: Keyset does not exist
UATHelper: Packaging (iOS):
UATHelper: Packaging (iOS): at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
UATHelper: Packaging (iOS): at System.Security.Cryptography.X509Certificates.X509Utils._ExportCertificatesToBlob(SafeCertStoreHandle safeCertStoreHandle, X509ContentType contentType, IntPtr password)
UATHelper: Packaging (iOS): at System.Security.Cryptography.X509Certificates.X509Certificate.ExportHelper(X509ContentType contentType, Object password)
UATHelper: Packaging (iOS): at iPhonePackager.CompileTime.CopyFilesNeededForMakeApp() in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\IOS\iPhonePackager\CompileTime.cs:line 274
UATHelper: Packaging (iOS): at iPhonePackager.CompileTime.CreateApplicationDirOnMac() in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\IOS\iPhonePackager\CompileTime.cs:line 580
UATHelper: Packaging (iOS): at iPhonePackager.CompileTime.PackageIPAOnMac() in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\IOS\iPhonePackager\CompileTime.cs:line 620
UATHelper: Packaging (iOS): at iPhonePackager.Program.Main(String[] args) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\IOS\iPhonePackager\iPhonePackager.cs:line 882
UATHelper: Packaging (iOS): ERROR: System.Exception: IPP ERROR: Application exception: System.Security.Cryptography.CryptographicException: Keyset does not exist
UATHelper: Packaging (iOS): at UnrealBuildTool.IOSToolChain.PostBuildSync(UEBuildTarget Target) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\IOS\IOSToolChain.cs:line 1949
UATHelper: Packaging (iOS): at UnrealBuildTool.IOSPlatform.PostBuildSync(UEBuildTarget Target) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\IOS\UEBuildIOS.cs:line 684
UATHelper: Packaging (iOS): at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile, Boolean bCatchExceptions) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 1683
UATHelper: Packaging (iOS): (see C:\Users\Wil\AppData\Roaming\Unreal Engine\AutomationTool\Logs\G+Epic+Games+UE_4.20\UBT-GiftSlinger-IOS-Development_2.txt for full exception trace)
UATHelper: Packaging (iOS): Total build time: 59.38 seconds (Remote executor: 18.96 seconds)
PackagingResults: Error: System.Exception: IPP ERROR: Application exception: System.Security.Cryptography.CryptographicException: Keyset does not exist
UATHelper: Packaging (iOS): Took 59.8194768s to run UnrealBuildTool.exe, ExitCode=1
UATHelper: Packaging (iOS): ERROR: UnrealBuildTool failed. See log for more details. (C:\Users\Wil\AppData\Roaming\Unreal Engine\AutomationTool\Logs\G+Epic+Games+UE_4.20\UBT-GiftSlinger-IOS-Development_2.txt)
UATHelper: Packaging (iOS): (see C:\Users\Wil\AppData\Roaming\Unreal Engine\AutomationTool\Logs\G+Epic+Games+UE_4.20\Log.txt for full exception trace)
PackagingResults: Error: UnrealBuildTool failed. See log for more details. (C:\Users\Wil\AppData\Roaming\Unreal Engine\AutomationTool\Logs\G+Epic+Games+UE_4.20\UBT-GiftSlinger-IOS-Development_2.txt)
UATHelper: Packaging (iOS): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (iOS): BUILD FAILED