2015-11-12 45 views
0

对于概念验证,我希望能够拨打特定电话号码并将数据传递给电话号码。iOS拨打电话并传递数据

这可能吗?

+3

将数据传递给电话号码?这是什么意思 –

+0

你可以拨打一个指定的电话号码。 –

+0

您可以按照建议的方式拨打电话,但您通过传递数据意味着什么? – NSNoob

回答

3

关于第一个问题I'd like to be able to make a phone call to a specific phone number

答:

YES,你可以不喜欢它

为前

let phoneNumber = "1234567890" 

    if let phoneCallURL = NSURL(string: "telprompt://(phoneNumber)") { 
     let application = UIApplication.sharedApplication() 
     if application.canOpenURL(phoneCallURL) { 
      application.openURL(phoneCallURL) 
     } 
     else{ 
      println("failed") 
     } 
    } 

关于第二个问题pass data to the telephone number

答:

NO,这是不可能

但是,你可以将数据发送到后端上的呼叫事件,并触发短信到特定号码