0

I am working on a app which requires call forwarding. As we know we can't dial USSD code programmatically in iOS, can we track whether a user dialled USSD code through iPhone or if possible, Is der a way to check whether SIM is used to dial USSD code?

Update1: M nt trying to call ussd programmatically but want to check whether user dialled it or not.For example, if we call USSD codes manually, can we check any logs or any class object variable which can help in finding out whether user dialled a specific USSD code

rmaddy
  • 314,917
  • 42
  • 532
  • 579
daemon22
  • 97
  • 9

2 Answers2

0

I don't think there is a way to do that on your app without using the private API.

To prevent users from maliciously redirecting phone calls or changing the behavior of a phone or account, the Phone application supports most, but not all, of the special characters in the tel scheme. Specifically, if a URL contains the * or # characters, the Phone application does not attempt to dial the corresponding phone number.

If your project is intended to be deployed outside of the App Store, you could use the CoreTelephony framework:

CTCallDialWithID(@"*100#", -1);
jbouaziz
  • 1,484
  • 1
  • 12
  • 24
  • Implicit declaration of function 'CTCallDialWithID' is invalid in C99 im getting this error, do you have any idead? – Meghs Dhameliya Dec 16 '15 at 10:48
  • @MeghsDhameliya not really, this function has always been a private API and they might have blocked its Xcode support since. – jbouaziz Dec 27 '15 at 19:44
0

refer this link may be helpful you

dial USSD code from iphone programatically

Updated:

Sadly, Apple have disable the use of USSD codes from within the (legitimate) iPhone sandbox available to developers (via the open URL methods, passing in a tel://xxxxxx URL). This means that there won’t be any applications from your operators that will make it easy to retrieve and change network settings that can be released thru the app store – at least not until Apple change their mind about interactions with USSD codes.

referanced by ussd-codes-on-iphone

Community
  • 1
  • 1
codercat
  • 22,873
  • 9
  • 61
  • 85
  • M nt trying to call ussd programmatically but want to check whether user dialled it or not.For example, if we call USSD codes manually, can we check any logs or any class object variable which can help in finding out whether user dialled a specific USSD code – daemon22 Feb 15 '14 at 07:16
  • There is no way to go through the device console log. – jbouaziz Feb 15 '14 at 07:27