The IOS platform does not exist in the project settings.

The actual file with the GetValidVersionRange() method is: ApplePlatformSDK.Versions.cs and the file path is: UnrealEngine/Engine/Source/Programs/UnrealBuildTool/Platform/Mac

But other than that this solution worked for me.