Aldo Lazuardi
Aldo Lazuardi

Reputation: 1948

is it possible to hide number from NSURL tel function in swift 2?

    @IBAction func callingButtonTapped(sender: AnyObject) {
    let busPhone = String("0888888")
    let namePhone = String("NAME")
    if let url = NSURL(string: "tel://\(busPhone)") {
        UIApplication.sharedApplication().openURL(url)
    }

Hi I'm new at developing apps with Swift. Is it possible when i call this 088888 number from app, number not show up and show 'NAME' instead?

Upvotes: 3

Views: 910

Answers (3)

user3182143
user3182143

Reputation: 9599

Always it is not possible to hide the number from URL.We can't hide and show the 'Name' instead of URL No.We can call the no using tel:088888 default using open URL. In iOS it is not possible to do this.

Upvotes: 0

Felix Lamouroux
Felix Lamouroux

Reputation: 7484

No this is not possible. The URL-Scheme merely opens the phone app which dials the number.

This is not possible regardless of the programming language on iOS.

Upvotes: 3

Stefan
Stefan

Reputation: 1496

No, it is not possible. These are the capabilities of the tel URL scheme: https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html And it has nothing to do with Swift vs Objective-C.

Upvotes: 0

Related Questions