简体   繁体   中英

Receiving phone calls in Swift iOS

Is there any way to receive a phone calls from App and decline it by sending sms progmatically? Or receive calls and then switch on autospeaker?

Pseudo code of what i want be like:

    if (someone is calling) {
       if (someone = Father) {
           autoReply("Dad, i'm on the meeting. Will call you back in 1 hour")
       }
    }

There is a lot of information about how to do a phone call, but much less about receiving it. Any response will be appreciated!

Sorry for my perhaps silly question :) I'm newbie in iOS Swift Development.

Unless you are working on a jailbroken app, this is not possible in any way .
You have to understand that iOS development is limited by Apple's restrictions and guidelines. All apps are sandboxed and can't affect the system's behavior in any way (excepted through iOS public API's, and none of them offers hook up to phone call events).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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