Add support for preview without network interfaces in iOS emulators

This commit is contained in:
Andoni Morales Alastruey 2018-10-26 21:56:11 +01:00
Родитель ec139e208e
Коммит b2ebb1af62
1 изменённых файлов: 10 добавлений и 2 удалений

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

@ -77,12 +77,20 @@ namespace XAMLator
Address = y.Address.ToString(),
Port = port,
Interface = x.Name
}));
})).ToArray();
if (!iips.Any())
{
iips = new DiscoveryBroadcastAddress[] {new DiscoveryBroadcastAddress {
Address = "127.0.0.1",
Port = port,
Interface = ""
}};
}
var r = new DiscoveryBroadcast
{
DeviceName = "Device",
DeviceModel = "Model",
Addresses = iips.ToArray()
Addresses = iips
};
#if __IOS__
var dev = UIKit.UIDevice.CurrentDevice;