IOS app converting the dialed number automatically

ranjeet423 Posts 6 Registration date Friday August 14, 2015 Status Member Last seen October 7, 2015 - Oct 7, 2015 at 07:49 AM
 Blocked Profile - Oct 7, 2015 at 06:27 PM
I am working on an iOS app and writing code to make calls from that app. It is working fine for non toll free numbers, But for some number such as <REMOVED BY MODERATOR> for BigBasket, it is converting the number as +1(860)<REMOVED BY MODERATOR> which when dialed comes as wrong number. But for numbers starting with 1800 it is working fine. I am searching solution of this query and taking help from some and iphone blogs. If you have answer of my query please reply me. Please check my code snippet.

private func dialNumber(phoneNumber:String) {
let phoneUrl:NSURL = NSURL(string: "tel://\(phoneNumber)")!
let application:UIApplication = UIApplication.sharedApplication()
self.ratingLabel.text = "Rate (self.selectedProvider!.providerName)' Customer Care"
callCenter.callEventHandler = {(call:CTCall!) in
switch call.callState {
case CTCallStateConnected:
case CTCallStateDisconnected:
NSUserDefaults.standardUserDefaults().setBool(true, forKey: "ctCall")

1 reply

Blocked Profile
Oct 7, 2015 at 06:27 PM
You have used all native wrappers that are clearly documented as to how to use them. Nothing you have posted is custom, nor does conversions. You have to go back to the SDK documentation to see what SWITCH you have to use on the packages you wish to access. I would start with the NSURL call that you have, and see if it has a switch that will not convert on "OUT OF AREA CALLS". Probably something like let phoneUrl:NSURL = NSURL(string: "tel://\(phoneNumber)", false).