USSD calls with * and # dont work iOS

I have an application that needs to make a USSD call, but on some devices the * and # don't work on the dialer, on others it does.

if let phoneNumber = ussdNumberTextfield.text {
    let encoded = "telprompt:\(phoneNumber)".addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
            if let url = URL(string: encoded) {
                if  application.canOpenURL(url){
                    DispatchQueue.main.async {
                        self.application.open(url, options: [:]) { success in
                            
                        }
                    }
                }
            }
        }

Have you tried percent encoding the # and *? %23 and %2A

Yes, but it still doesn't work. When I put %, # or * the method (application.canOpenURL) is successful, but it does not open the dialer. only works with numbers

USSD codes are an ongoing source of weird compatibility problems. I’d like to clarify what you mean by “some devices”. Have you hit a case where two iPhones running identical versions of iOS are showing different behaviour? That is, one works and one fails?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I’d like to follow up on that issue, it’s been 2 years now and it’s still not resolved.

this is really frustrating for our users as USSD is the main way of doing things in certain markets.

Any ETA on when we can expect a fix for it?

Hello jaysack,

Sorry for not following up on the additional info provided. The inconsistent behavior across two identical iPhones that @Regadas reported does sound like a bug.

If you're seeing this issue as well, please file a bug report so our engineering team can investigate it in full. Do include device model, iOS version, and if possible, a focused test sample app that reproduces the issue. Once you open the bug report, please post the FB number here for our reference.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

Filing a bug report will allow Feedback Assistant to notify you if and when the bug gets fixed. That is the case even if it is a duplicate of an existing known issue. If anyone else in this thread is experiencing this USSD dialer issue, please don't hesitate to file a report as well.

Once again, we apologize for not replying sooner to this thread. For future reference, it's generally advisable to post replies rather than comments (which are usually reserved for short messages), see #5 of Quinn’s Top Ten DevForums Tips.

Thank you for your patience,

Richard Yeh  Developer Technical Support

USSD calls with * and # dont work iOS
 
 
Q