[msbuild] Only validate the Info.plist values if we're actually creating an app manifest.

This commit is contained in:
Rolf Bjarne Kvinge 2021-08-23 17:40:55 +02:00
Родитель b3dff34ea5
Коммит f0b992c3c1
3 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -72,6 +72,8 @@ namespace Xamarin.MacDev.Tasks
public string SdkVersion { get; set; }
public string TargetArchitectures { get; set; }
public bool Validate { get; set; }
#endregion
protected TargetArchitecture architectures;

Просмотреть файл

@ -337,6 +337,7 @@ Copyright (C) 2018 Microsoft. All rights reserved.
SdkIsSimulator="$(_SdkIsSimulator)"
SdkVersion="$(_SdkVersion)"
DebugIPAddresses="$(_DebugIPAddresses)"
Validate="$(_CreateAppManifest)"
>
</CompileAppManifest>
</Target>

Просмотреть файл

@ -286,6 +286,9 @@ namespace Xamarin.iOS.Tasks
void Validation (PDictionary plist)
{
if (!Validate)
return;
var supportsIPhone = (supportedDevices & IPhoneDeviceType.IPhone) != 0
|| supportedDevices == IPhoneDeviceType.NotSet;
var supportsIPad = (supportedDevices & IPhoneDeviceType.IPad) != 0;