简体   繁体   English

iOS拨打电话并传递数据

[英]iOS Make a phone call and pass data

For a Proof of Concept, I'd like to be able to make a phone call to a specific phone number and pass data to the telephone number. 对于概念验证,我希望能够打一个特定的电话号码并将数据传递给该电话号码。

Is this possible? 这可能吗?

for your first question I'd like to be able to make a phone call to a specific phone number 对于第一个问题, I'd like to be able to make a phone call to a specific phone number

Ans: 答:

YES , you can do it like 是的 ,您可以像

for ex 对于前

 let phoneNumber = "1234567890"

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

for your second question pass data to the telephone number , 对于第二个问题,请将pass data to the telephone number

Ans: 答:

NO, it is not possible 不,不可能

but, you can send the data to backend on that call event, and trigger the sms to particular number 但是,您可以将数据发送到该通话事件的后端,然后将短信触发到特定号码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM