2017-07-25 115 views
1

我在我的應用程序中使用iOS 10的CallKit來接收來電。我正在使用CXHandleType:CXHandleTypeGeneric與特定的調用者句柄。如何從CallKit UI中刪除'提醒我'按鈕?

我沒能獲得在點2,其中從字符串「音頻...」會來嗎?我只在CXProviderConfiguration中設置了字符串'Call From'。

CXProviderConfiguration *configuration = [[CXProviderConfiguration alloc] initWithLocalizedName:@"Call From"]; 

我想刪除這個'音頻...'字符串,請幫助。

2-當接聽電話打開CallKit用戶界面時,「提醒我」按鈕也會出現。 如何從本機用戶界面中刪除它?根據我的要求,這個按鈕是沒用的。

請幫助,在此先感謝。

我有配置呼叫套件:

- (void)configureCallKit { 
    CXProviderConfiguration *configuration = [[CXProviderConfiguration alloc] initWithLocalizedName:@"Call From"]; 
    configuration.maximumCallGroups = 1; 
    configuration.maximumCallsPerCallGroup = 1; 
    UIImage *callkitIcon = [UIImage imageNamed:@"iconMask80"]; 
    configuration.iconTemplateImageData = UIImagePNGRepresentation(callkitIcon); 

    _callKitProvider = [[CXProvider alloc] initWithConfiguration:configuration]; 
    [_callKitProvider setDelegate:self queue:nil]; 

    _callKitCallController = [[CXCallController alloc] init]; 
} 

enter image description here

+0

是否是您的應用程序名稱的音頻?目前無法在本機來電用戶界面中禁用此按鈕,或改爲使用您的應用程序。 –

+0

不,音頻不是我的應用程序名稱。我也搜索過,但我的代碼中沒有音頻字符串。 –

+0

如果我們不能禁用提醒我按鈕,那麼我如何使用它而不提醒我按鈕?請建議。 –

回答

0

對於第1題:

當您創建的配置,您通過 「呼叫發件人」,而不是應用程序的名稱,所以Callkit節目你「從音頻呼叫」而不是「AppName音頻」。

爲了解決這個問題,你可以創建提供商配置爲:

CXProviderConfiguration * configuration = [[CXProviderConfiguration alloc] [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]]; 

對於第二個問題,我想刪除它,但我不知道如何,如果它可以刪除。

+0

我想刪除音頻,請檢查問題。 –

+0

你不能這樣做。蘋果公司使用它來識別,如果calle os音頻或視頻。 – AntonioM

+0

是的,我已經知道,當用戶有電話連接,然後它給我的音頻計時器,當我刪除字符串「呼叫從」它顯示音頻XX:XX:XX。謝謝。 –