2017-05-26 54 views
0

我有一个应用程序,使用户可以拨打特定号码的电话。我在做以下事情: -打电话iOS Xamarin

private void CallContact(string phone) 
      { 

       phone = phone.Replace(" ", ""); 

       var callURL = new NSUrl("tel:" + phone); 


       try 
       { 
        if (UIApplication.SharedApplication.CanOpenUrl(callURL)) 
        { 
         UIApplication.SharedApplication.OpenUrl(callURL); 
        } 
        else 
        { 
         var av = new UIAlertView("Not supported", 
         "Calling is not supported on this device", 
         null, 
         "OK", 
         null); 
         av.Show(); 
        } 
       } 
       catch (Exception ex) 
       { 
        return; 
       } 



      } 

这工作正常。但是当我试图发布应用程序,我的应用程序得到了拒绝和苹果团队问我如下: -

We noticed that your app has CallKit and CallKit Blocker enabled: 
⁃Which features of your app require CallKit and CallKit Blocker functionality? 
⁃Where, specifically, in the app would users access these features? 

我不是在我的应用程序使用CallKit功能的任何地方。我搜索了并发现它随Xamarin.iOS.dll一起发货。有可能我在我的应用程序中拨打电话的方式使用CallKit?

对不起,贝因一个noob :)

+0

https://stackoverflow.com/questions/39751196/publishing-issue-callkit-is-included-even-we-是不是使用它 – SushiHangover

+0

@SushiHangover我已经经历了这个问题。我也实施了建议。我只需要确认,因为我使用的是调用功能,但似乎并没有使用CallKit。 – user3034944

+0

@SushiHangover此外,由于我是iOS新手,我不确定我打电话的方式是否间接使用CallKit。 – user3034944

回答

0

尝试此解决方案

partial void BtnContactBillingCall_TouchUpInside (UIButton sender) 
     { 
      var confirm = new UIAlertView("","Call "+ mobilenumber + " ?",null,"Cancel","Call"); 
      confirm.Show(); 
      confirm.Clicked += (object senderConfirm, UIButtonEventArgs e) => 
      { 
       if(e.ButtonIndex ==0) 
       { 

       } 
       else 
       { 
        var url = new Foundation.NSUrl("tel:"+mBillingPhoneNumber); 
        UIApplication.SharedApplication.OpenUrl(url); 
       } 

      }; 
     }