How to make USSD call on iOS 15.4 beta

My App try to call via tel: scheme for USSD, it worked on iOS 15.3 and earlier but doesn't work on iOS 15.4 beta.

let number = "10*10#" // Doesn't work.
// let number = "1234" // This is Okay.

guard let url = URL(string: "tel:" + number),
          UIApplication.shared.canOpenURL(url) else {
    fatalError()
}

UIApplication.shared.open(url, options: [:]) { success in
    print("success: \(success)") // This is true
}

canOpenUrl() returns true, which means now we can call open() method. But nothing happens when we call open(url: options: completion:).

  • I am facing the same issue if you got the solution please comment Thank You

  • Same issue here. My app functionality is broken for this -- I allow users to make calls with their caller id blocked by prefixing with '67'. I've tried manually encoding by replacing '' with '%2A' but it still does not work. Has anyone opened a Technical Support incident?

  • Is there going to be a fix for this limitation? This impacts a very large amount of users.. The proposed workaround is not a quick solution for multiple sites and would have to be addressed individually??

Accepted Reply

This issue seems to be resolved with iOS 15.5 beta 4. So, I think we should wait for its release and my user for updating iOS.

  • Is there a fix for 15.5? Through testing, it is found that it still does not work on ios15.5

  • we still have the issue.

Add a Comment

Replies

You need to percent-encode your string for characters like # to work in a URL.

You can add this extension to String:

import Foundation

extension String {
    func  percentEncoded() -> String? {
        return (self as NSString).addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)
    }
}

Then, you would use it like so:

if let percentEncodedString = "10*10#".percentEncoded(), let url = URL(string: "tel:" + percentEncodedString) {
    // Use url
}
  • Thank you. I tried your code already, but it doesn't work. iOS 15.4 seems never allow USSD number for security reason or something.

    eskimo + "1" + "@apple.com" says 'The Apple URL Scheme Reference describes this limitation and the reasons for it.' https://developer.apple.com/forums/thread/14766

  • "Thank you. I tried your code already, but it doesn't work. iOS 15.4 seems never allow USSD number for security reason or something. eskimo + "1" + "@apple.com" says 'The Apple URL Scheme Reference describes this limitation and the reasons for it.' https://developer.apple.com/forums/thread/14766%C2%A0%E2%80%94%C2%A0user21%C2%A01 week ago " That thread was from 6 years ago. This was fixed in iOS11 and worked until iOS15.4.

  • We are facing the same issue in Cordova App. We need an urgent fix here please.

Add a Comment

I have the same problem

we can dial using openURL and using tel://number. the moment we have something like "tel://number;conference%23" it fails, but only on iOS 15.4 beta, this same conference number dialing works without issue on iOS 15.3.1 and previous versions. There must be tickets with their engineers about this issue and out ticket has yet to be replied so likely they will be addressing in the actual release version of 15.4.

  • Sadly no. It's broken in the released version of iOS 15.4 as well 😞

Add a Comment

Same issue here, waiting for a hotfix :(

Same issue, I noticed that it's still working if linked in a WebView but it's not working with UIApplication.shared.open()

Only 15.4 seems affected.

  • I'd love to see how you're making this work in a WKWebView. When I try (with a form button or a CSS button) it doesn't work.

  • I tried escaping the "#" with %23, was working in a WebView.

    <a href="tel:%23%23002%23">Call ##002#</a>

  • Edit: Commented in the wrong place :)

Add a Comment

We are having the same issue. Worked from iOS11 until iOS15.3.

Same issue here. 15.4 doesn't allow use to use the # character in any dialer therefore our app cannot prompt the dialer. It looks like it just drops the character. Apple please let us know if this is the intended behavior going forward or they will be a hot fix.

From the documentation https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html#//apple_ref/doc/uid/TP40007899-CH6-SW1 "Specifically, if a URL contains the * or # characters, the Phone app does not attempt to dial the corresponding phone number." It looks like the previous behavior (allowing special characters) may have been the bug and now the normal behavior. Hopefully not.

  • That's what we're all wondering

Add a Comment

We are using this functionality to make an anonymous calls (ReactNative), and starting from 15.4 it became broken (or working properly according to the documentation).

Weirdly enough, clicking a link on the website<a href="tel:#31#1111111111" target="_blank">tel</a> still works...

It would be super helpful if Apple explains if it's a bug or a feature.

same issue here. it appears only on iOS 15.4 our url of tel scheme looks like this:

tel://+1234567890,,33097278*110213*1#

adding percent encoding does not fix the issue, because it adds encoding to “#”, but it does not add it to “*”

need working solution asap

same issue happens only on iOS15.4, need an alternate solution or a fix from apple

Same issue here, and this needs to be addressed ASAP as this interferes with the ability for our clients to quickly dial into a Zoom call.

With Zoom as such an essential piece of everyday work now, custom call-in URLs have never been more important.

Being able to include the # character allows for users to dial directly into the meeting with 1 touch.

Hoping Apple understands the time sensitive nature of this issue for developers.

Same issue for us, still waiting for a hotfix :(

Sad to report that the iOS 15.4.1 update didn't address this 😞

Devs: if you haven't done so already, file a ticket with Apple using the Feedback Assistant app.

Hi. I have the same issue with version 15.4. Unfortunately the recent update to 15.4.1 still did not resolve the issue. I'm starting to think this is done on purpose