2017-05-26 75 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); 
       } 

      }; 
     }