title: Swift canOpenURL() error iOS9 privacy issue tel:// and telprompt://
body: <pre><code>    @IBAction func callfriendbutton(sender: AnyObject) {
  
              let phoneNumberstring = NSUserDefaults.standardUserDefaults().stringForKey("phoneNum");
  
          var escapednum: String = phoneNumberstring!.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)!
  
  
          let urlString = "telprompt://\(escapednum)";
  
          let url = NSURL(string: urlString);
          if UIApplication.sharedApplication().canOpenURL(url!) {
          UIApplication.sharedApplication().openURL(url!);
          }
  
  }
  </code></pre>
  
  <p>I tried everything and it still won't work, I also added to my info.plist allowing both tel and telprompt to work but this is the error I get</p>
  
  <p>2016-03-27 03:18:24.013 TACTAC[64525:4775035] -canOpenURL: failed for URL: "telprompt://1234567891" - error: "(null)"</p>