1

I am facing a strange issue, after I started running my app on iOS11 devices.

I do NOT have a 'rejection' from Apple but it simply stopped working on devices/simulators using iOS11.

For the call action to a number, I used the below code which worked well (and still works) on iOS10 simulators and devices.

let myPhoneNumber = "123456789"
if let url = URL(string: "telprompt://\(myPhoneNumber)"), UIApplication.shared.canOpenURL(url) {
            UIApplication.shared.openURL(url)
        }

The same code doesn't work on iOS 11 anymore. I have my project migrated to Swift 4.0.2 as well. Did I miss something specific?

PS: I have this in my info.plist already added under the LSApplicationQueriesSchemes

Lohith Korupolu
  • 1,066
  • 1
  • 18
  • 52
  • Possible duplicate of [Will apps that use telprompt be rejected](https://stackoverflow.com/questions/11608940/will-apps-that-use-telprompt-be-rejected) – clemens Jan 10 '18 at 08:16
  • Thanks for the info @clemens... not sure how this is a duplicate. I am facing a trouble only from ios11... and my app was never rejected by using telprompt – Lohith Korupolu Jan 10 '18 at 08:20
  • 1
    You should be able to switch from 'telprompt' to 'tel' now as I think they both work the same. It's not going to work in the simulator. Also openURL is deprecated so could cause a problem. – Upholder Of Truth Jan 10 '18 at 08:57
  • If Apple has rejected apps that use it, it's obvious why it doesn't work in iOS 11, isn't it? Please read the linked thread completely. – clemens Jan 10 '18 at 09:08
  • @clemens: most of the comments and responses say their apps were not rejected. Also, the URL in the question is not valid anymore (404). Be it tel or telprompt, neither of them working in iOS 11 and that's very much my question :) I am going to try Sarabjit's answer in a bit – Lohith Korupolu Jan 10 '18 at 09:15
  • The comments say, that `tel:` and `telprompt:` are now the same. Take a look what @UpholderOfTruth above suggested. – clemens Jan 10 '18 at 09:19

0 Answers0