2016-06-03 2 views
0

나는 VOIP 애플리케이션으로 작업하고 있습니다. ios 앱에서 (,)로 표시된 일시 중지가 포함 된 전화를 걸 으려합니다.일시 중지 된 ios 앱에서 전화하기

 NSString *phoneNumber = [@"telprompt://" stringByAppendingString:finalNumber]; 
     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]]; 

전화 걸기 번호에서 전화가 연결되지 않습니다. 내 전화 번호에 잠시 멈춤을 허용하기 위해 사용할 수있는 것.

답변

0

tel:// 방식을 사용해보십시오 :

목표 - C

NSString *telUrl = [NSString stringWithFormat:@"tel://%@,%@", contactPhone, contactExtension]; 
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:telUrl]]; 

스위프트

let formattedPhone = "tel://\(contactPhone),\(contactExtension)" 
    if let phoneURL = NSURL(string:formattedPhone) { 
     print(phoneURL) 
     UIApplication.sharedApplication().openURL(phoneURL) 
    } 

을 그리고 당신의 문자열에 공백이없는 있는지 확인하십시오.

건배.

관련 문제