Dial Ussd Code from iPhone Programmatically

dial USSD code from iphone programmatically

You cannot dial a number containing * or # characters. Apple doesn't allow them in a dial string for security reasons.

Apple Documentation says :

To prevent users from maliciously redirecting phone calls or changing
the behavior of a phone or account, the Phone app supports most, but
not all, of the special characters in the tel scheme. Specifically, if
a URL contains the * or # characters, the Phone app does not attempt
to dial the corresponding phone number. If your app receives URL
strings from the user or an unknown source, you should also make sure
that any special characters that might not be appropriate in a URL are
escaped properly. For native apps, use the
stringByAddingPercentEscapesUsingEncoding: method of NSString to
escape characters, which returns a properly escaped version of your
original string.

How to get USSD code response in my ios app

You can't do this on iOS. Apps are sandboxed and do not generally have access to data from other applications (there are specific methods that allows apps to share data, such as the pasteboard), so your app cannot access data from the phone app.

Call to a number, which contain #. (IPhone SDK)

iOS SDK (Apple URL scheme reference) tells:
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.

So, no luck.

USSD call without user confirmation

If the user cannot see what number you are calling before granting permission, what stops you from calling a premium-rate number (like a 900 or 976 number in the USA) that charges $1000 to the user's cellular phone bill for the call?

Answer: nothing. That's why Apple does not let you call a number without user approval.

Also, even if you show the number, this sounds suspiciously like something Apple would reject on the grounds of not using Apple's own In-App Purchase system.



Related Topics



Leave a reply



Submit