[4.18.1] Iphone launch / packaging fails with System.FormatException: Unknown char at at UnrealBuildTool.IOSExports.SupportsIconCatalog

**Problem **

No longer possible to launch on iPhone after upgrade from 4.18.0 to 4.18.1.
This is a major blocker for me since I’m working with AR and need to test on the phone rather than in a simulator.

Seems that Iphone packaging fails with System.FormatException: Unknown char at at UnrealBuildTool.IOSExports.SupportsIconCatalog
This seems to be happening while creating a plist during IOSPlatform.GetFilesToDeployOrStage and BuildCookRun.DoBuildCookRun

System

  • MacBook Pro, 15-inch 2017, 3,1GHz,
    16GB RAM, Radeon Pro 560 4GB + Intel
    HD Graphics 630 1536 MB, macOS High
    Sierra Version 10.13.1

  • iPhone 6s, iOS 11.2 developer beta 4,
    Xcode 9.2 beta (also tried with Xcode
    9 non-beta)

  • Unreal Engine UE 4.18.1

Steps to reproduce:

New project → Blueprint → First Person starter content with Mobile/Tablet, Maximum Quality and With starter content

Add IOS certificates in project settings and click Launch (on iPhone).

Possible hints

xxx UPDATE xxx:

Seems to be related to the code here https://github.com/EpicGames/UnrealEngine/blob/dbced2dd59f9f5dfef1d7786fd67ad2970adf95f/Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSExports.cs
The exception is probably thrown while reading additional properties. The only place where I’ve found those in my project are in a file Binaries/IOS/[projectname].target
In that file it says:

"AdditionalProperties": [
	{
		"Name": "SDK",
		"Value": "11,2"
	}
]

So somewhere in the system the SDK is reported as 11,2 with a comma, I think that might be related to the parsing failure. And even if it didn’t fail it would probably parse the wrong number since comma means something else.
Might have something to do with me running Swedish locale on my Mac since In Swedish comma means decimal delimiter.

Outcome:

LogPlayLevel: ********** STAGE COMMAND STARTED **********
LogPlayLevel: Creating UE4CommandLine.txt
LogPlayLevel: Creating Staging Manifest...
LogPlayLevel: Completed Launch On Stage: Build Task, Time: 21.590294
LogPlayLevel: CookPlat IOS, this IOSPlatform
LogPlayLevel: UPL Init: None
LogPlayLevel: ERROR: System.FormatException: Unknown char
LogPlayLevel:          at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0
LogPlayLevel:          at System.Single.Parse (System.String s) [0x00000] in <filename unknown>:0
LogPlayLevel:          at UnrealBuildTool.IOSExports.SupportsIconCatalog (UnrealTargetConfiguration Config, Tools.DotNETCommon.DirectoryReference ProjectDirectory, Boolean bIsUE4Game, System.String ProjectName) [0x00000] in <filename unknown>:0
LogPlayLevel:          at UnrealBuildTool.UEDeployIOS.GenerateIOSPList (Tools.DotNETCommon.FileReference ProjectFile, UnrealTargetConfiguration Config, System.String ProjectDirectory, Boolean bIsUE4Game, System.String GameName, System.String ProjectName, System.String InEngineDir, System.String AppDirectory, System.Boolean& bSupportsPortrait, System.Boolean&
 bSupportsLandscape, System.Boolean& bSkipIcons, UnrealBuildTool.UEDeployIOS InThis) [0x00000] in <filename unknown>:0
LogPlayLevel:          at UnrealBuildTool.UEDeployIOS.GeneratePList (Tools.DotNETCommon.FileReference ProjectFile, UnrealTargetConfiguration Config, System.String ProjectDirectory, Boolean bIsUE4Game, System.String GameName, System.String ProjectName, System.String InEngineDir, System.String AppDirectory, System.Boolean& bSupportsPortrait, System.Boolean& bS
upportsLandscape, System.Boolean& bSkipIcons) [0x00000] in <filename unknown>:0
LogPlayLevel:          at UnrealBuildTool.IOSExports.GeneratePList (Tools.DotNETCommon.FileReference ProjectFile, UnrealTargetConfiguration Config, Tools.DotNETCommon.DirectoryReference ProjectDirectory, Boolean bIsUE4Game, System.String GameName, System.String ProjectName, Tools.DotNETCommon.DirectoryReference InEngineDir, Tools.DotNETCommon.DirectoryRefere
nce AppDirectory, System.Boolean& bSupportsPortrait, System.Boolean& bSupportsLandscape, System.Boolean& bSkipIcons) [0x00000] in <filename unknown>:0
LogPlayLevel:          at IOSPlatform.DeployGeneratePList (Tools.DotNETCommon.FileReference ProjectFile, UnrealTargetConfiguration Config, Tools.DotNETCommon.DirectoryReference ProjectDirectory, Boolean bIsUE4Game, System.String GameName, System.String ProjectName, Tools.DotNETCommon.DirectoryReference InEngineDir, Tools.DotNETCommon.DirectoryReference AppDi
rectory, System.Boolean& bSupportsPortrait, System.Boolean& bSupportsLandscape, System.Boolean& bSkipIcons) [0x00000] in <filename unknown>:0
LogPlayLevel:          at IOSPlatform.GetFilesToDeployOrStage (AutomationTool.ProjectParams Params, DeploymentContext SC) [0x00000] in <filename unknown>:0
LogPlayLevel:          at Project.CreateStagingManifest (AutomationTool.ProjectParams Params, DeploymentContext SC) [0x00000] in <filename unknown>:0
LogPlayLevel:          at Project.CopyBuildToStagingDirectory (AutomationTool.ProjectParams Params) [0x00000] in <filename unknown>:0
LogPlayLevel:          at BuildCookRun.DoBuildCookRun (AutomationTool.ProjectParams Params) [0x00000] in <filename unknown>:0
LogPlayLevel:          at BuildCookRun.ExecuteBuild () [0x00000] in <filename unknown>:0
LogPlayLevel:          at AutomationTool.BuildCommand.Execute () [0x00000] in <filename unknown>:0
LogPlayLevel:          at AutomationTool.Automation.Execute (System.Collections.Generic.List`1 CommandsToExecute, System.Collections.Generic.Dictionary`2 Commands) [0x00000] in <filename unknown>:0
LogPlayLevel:          at AutomationTool.Automation.Process (System.String[] Arguments) [0x00000] in <filename unknown>:0
LogPlayLevel:          at AutomationTool.Program.MainProc (System.Object Param) [0x00000] in <filename unknown>:0
LogPlayLevel:          at AutomationTool.InternalUtils.RunSingleInstance (System.Func`2 Main, System.Object Param) [0x00000] in <filename unknown>:0
LogPlayLevel:          at AutomationTool.Program.Main () [0x00000] in <filename unknown>:0
LogPlayLevel:        (see /Users/[USERNAME]/Library/Logs/Unreal Engine/LocalBuildLogs/UAT_Log.txt for full exception trace)
LogPlayLevel: AutomationTool exiting with ExitCode=1 (Error_Unknown)
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 0.000055
LogPlayLevel: RunUAT ERROR: AutomationTool was unable to run successfully.
PackagingResults: Error: Launch failed! Unknown Error

I changed the locale of the Mac to English (US) and then it started working again.
So probably Xcode have started reporting the SDK version with localized decimal delimiters.
Since I normally have Swedish locale the SDK version became 11,2 with a comma which Unreal tries to parse and fails since it probably parses without localization configuration, e.g. uses dot as decimal delimiter.
That’s what I think happens anyways.
So the question is where the SDK version is collected from, is it from Xcode, and is Xcode gonna keep on reporting the version in localized form? If that is the case, Unreal should probably also parse it in localized form at line 132 here https://github.com/EpicGames/UnrealEngine/blob/dbced2dd59f9f5dfef1d7786fd67ad2970adf95f/Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSExports.cs

Maybe use something like the below instead?

Single.Parse(Results.ElementAt(0).Value, CultureInfo.InstalledUICUlture)

Super big thanks for this post.
Had the same problem with W10 (Finnish), changed to English and works great!

Thanks for this! I’m running Win10 set to United States (under Region settings), but date/numbers format was still set to Swedish. Got this fixed by going to Control Panel\Clock, Language, and Region\Change date, time, or number formats\Additional settings\Decimal symbol and changing it from ‘,’ to ‘.’

This post helped me produce a bug fix for the issue, and I have opened a pull-request on the Epic Unreal Engine repo on Github. The pull request has been approved, but are not yet implemented in any release as of yet (currently 4.22). If you are a member of the UE4 repo, you can take a look at the pull request on:
https://github.com/EpicGames/UnrealEngine/pull/5825