Reputation: 1948
@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
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
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
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