UWP Make phone call not allowed in China, 如何防止在中国部署?

UWP Make phone call not allowed in China, how to prevent deployment in China?

在我的应用程序中,我试图让用户按下按钮并进行 phone 调用

目前我正在使用这个

if (phoneCallStore != null)
{
   var lineGuid = await phoneCallStore.GetDefaultLineAsync();

   if (lineGuid != Guid.Empty)
   {
      var phoneLine = await PhoneLine.FromIdAsync(lineGuid);

      if (phoneLine != null && phoneLine.CanDial)
      {
         phoneLine.Dial(number, name);
      }
   }
}

但是我被微软拒绝了

Phone Call In Restricted Market: 2000.5 Phone Call In Restricted Market
The phonecall capability cannot be used in the application since it targets restricted markets (China). 

编辑

我尝试将中国从市场中移除,这解决了问题。
但是我可以通过某种方式检查用户是否来自中国吗?

The phonecall capability cannot be used in the application since it targets restricted markets (China).

然后当您提交您的应用程序时,您应该从目标市场列表中排除中国。