Вопрос

I was making a simple app where I wanted to allow user to make specific phone calls from the app.

We have a lot of special numbers over here which include * and # to get some specific data. I began writing the app and used this initially to make the call

NSString * phonenumber = [NSString stringWithFormat:@"%@%@%@",
@"tel://*188*",
number.text,
@"#"];

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phonenumber]];

While this method works on normal digits, the special characters are ignored so i ventured looking for the solution and found that the CoreTelephony Framework offers this capability.

My new method includes

  • adding the core telephony binary to the project
  • referencing the headers
  • using CTCallDialWithID(@"*000*0000#",-1); to make the call

Now everything works perfectly fine and here are my concerns

  • I get a warning which says "implicit declaration of function CTCallDialwithID is invalid in c99". I do not know if i should just ignore this or if I have missed something ?
  • I have been doing some research on core telephony, some people say app store will not accept an app with this, is this true ? The answers seem 2 years ago so I don;t know if things have changed, I mean apple is including the binary themselves and it is not a private framework like before right ? So will the app get accepted on the app store if I use this method?

Thank You

Это было полезно?

Решение

The Core Telephony framework is a valid framework. But there is no public method or function named CTCallDialWithID. That must be a private API. Apple will definitely reject your app for using a private API. You can only use the Core Telephony APIs documented by Apple. Any other use will cause a rejection (like in this case).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top