in Swift how to make a phone call with no confirmation dialog? [duplicate]












-1















This question already has an answer here:




  • ios User Prompt when making outgoing call via URL Scheme 10.2+

    1 answer




for my company, I need my app to make periodically some phone call to a given number and then analyze call quality.



I'm testing



private func callNumber(phoneNumber:String) {

if let phoneCallURL = URL(string: "telprompt://(phoneNumber)") {

let application:UIApplication = UIApplication.shared
if (application.canOpenURL(phoneCallURL)) {
if #available(iOS 10.0, *) {
application.open(phoneCallURL, options: [:], completionHandler: nil)
} else {
// Fallback on earlier versions
UIApplication.shared.openURL(phoneCallURL as URL)

}
}
}
}


but this code requires for a an "ok" on confirmation dialog. How can I avoid it? I found some answer, but they are old and in objective c










share|improve this question













marked as duplicate by Community Nov 12 at 14:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











  • 2




    I dont see why Apple would want to allow a developer to make random calls whenever it wants without asking the user if they want it done. it could be misused in a number of ways. If the documentation says that you can't do it... theres a very good chance that you can't do it
    – Scriptable
    Nov 12 at 13:05
















-1















This question already has an answer here:




  • ios User Prompt when making outgoing call via URL Scheme 10.2+

    1 answer




for my company, I need my app to make periodically some phone call to a given number and then analyze call quality.



I'm testing



private func callNumber(phoneNumber:String) {

if let phoneCallURL = URL(string: "telprompt://(phoneNumber)") {

let application:UIApplication = UIApplication.shared
if (application.canOpenURL(phoneCallURL)) {
if #available(iOS 10.0, *) {
application.open(phoneCallURL, options: [:], completionHandler: nil)
} else {
// Fallback on earlier versions
UIApplication.shared.openURL(phoneCallURL as URL)

}
}
}
}


but this code requires for a an "ok" on confirmation dialog. How can I avoid it? I found some answer, but they are old and in objective c










share|improve this question













marked as duplicate by Community Nov 12 at 14:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











  • 2




    I dont see why Apple would want to allow a developer to make random calls whenever it wants without asking the user if they want it done. it could be misused in a number of ways. If the documentation says that you can't do it... theres a very good chance that you can't do it
    – Scriptable
    Nov 12 at 13:05














-1












-1








-1








This question already has an answer here:




  • ios User Prompt when making outgoing call via URL Scheme 10.2+

    1 answer




for my company, I need my app to make periodically some phone call to a given number and then analyze call quality.



I'm testing



private func callNumber(phoneNumber:String) {

if let phoneCallURL = URL(string: "telprompt://(phoneNumber)") {

let application:UIApplication = UIApplication.shared
if (application.canOpenURL(phoneCallURL)) {
if #available(iOS 10.0, *) {
application.open(phoneCallURL, options: [:], completionHandler: nil)
} else {
// Fallback on earlier versions
UIApplication.shared.openURL(phoneCallURL as URL)

}
}
}
}


but this code requires for a an "ok" on confirmation dialog. How can I avoid it? I found some answer, but they are old and in objective c










share|improve this question














This question already has an answer here:




  • ios User Prompt when making outgoing call via URL Scheme 10.2+

    1 answer




for my company, I need my app to make periodically some phone call to a given number and then analyze call quality.



I'm testing



private func callNumber(phoneNumber:String) {

if let phoneCallURL = URL(string: "telprompt://(phoneNumber)") {

let application:UIApplication = UIApplication.shared
if (application.canOpenURL(phoneCallURL)) {
if #available(iOS 10.0, *) {
application.open(phoneCallURL, options: [:], completionHandler: nil)
} else {
// Fallback on earlier versions
UIApplication.shared.openURL(phoneCallURL as URL)

}
}
}
}


but this code requires for a an "ok" on confirmation dialog. How can I avoid it? I found some answer, but they are old and in objective c





This question already has an answer here:




  • ios User Prompt when making outgoing call via URL Scheme 10.2+

    1 answer








swift phone-call






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 12 at 11:34









biggreentree

47421023




47421023




marked as duplicate by Community Nov 12 at 14:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Community Nov 12 at 14:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 2




    I dont see why Apple would want to allow a developer to make random calls whenever it wants without asking the user if they want it done. it could be misused in a number of ways. If the documentation says that you can't do it... theres a very good chance that you can't do it
    – Scriptable
    Nov 12 at 13:05














  • 2




    I dont see why Apple would want to allow a developer to make random calls whenever it wants without asking the user if they want it done. it could be misused in a number of ways. If the documentation says that you can't do it... theres a very good chance that you can't do it
    – Scriptable
    Nov 12 at 13:05








2




2




I dont see why Apple would want to allow a developer to make random calls whenever it wants without asking the user if they want it done. it could be misused in a number of ways. If the documentation says that you can't do it... theres a very good chance that you can't do it
– Scriptable
Nov 12 at 13:05




I dont see why Apple would want to allow a developer to make random calls whenever it wants without asking the user if they want it done. it could be misused in a number of ways. If the documentation says that you can't do it... theres a very good chance that you can't do it
– Scriptable
Nov 12 at 13:05












1 Answer
1






active

oldest

votes


















-1














Taken from the iOS SDK Release Notes for iOS 10.3 https://developer.apple.com/library/archive/releasenotes/General/RN-iOSSDK-10.3/




openURL



When a third party application invokes openURL: on a tel://, facetime://, or facetime-audio:// URL, iOS displays a prompt and requires user confirmation before dialing.







share|improve this answer





















  • yes, I read it, I'm now looking for a way to make it in background, automatically.
    – biggreentree
    Nov 12 at 11:46


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









-1














Taken from the iOS SDK Release Notes for iOS 10.3 https://developer.apple.com/library/archive/releasenotes/General/RN-iOSSDK-10.3/




openURL



When a third party application invokes openURL: on a tel://, facetime://, or facetime-audio:// URL, iOS displays a prompt and requires user confirmation before dialing.







share|improve this answer





















  • yes, I read it, I'm now looking for a way to make it in background, automatically.
    – biggreentree
    Nov 12 at 11:46
















-1














Taken from the iOS SDK Release Notes for iOS 10.3 https://developer.apple.com/library/archive/releasenotes/General/RN-iOSSDK-10.3/




openURL



When a third party application invokes openURL: on a tel://, facetime://, or facetime-audio:// URL, iOS displays a prompt and requires user confirmation before dialing.







share|improve this answer





















  • yes, I read it, I'm now looking for a way to make it in background, automatically.
    – biggreentree
    Nov 12 at 11:46














-1












-1








-1






Taken from the iOS SDK Release Notes for iOS 10.3 https://developer.apple.com/library/archive/releasenotes/General/RN-iOSSDK-10.3/




openURL



When a third party application invokes openURL: on a tel://, facetime://, or facetime-audio:// URL, iOS displays a prompt and requires user confirmation before dialing.







share|improve this answer












Taken from the iOS SDK Release Notes for iOS 10.3 https://developer.apple.com/library/archive/releasenotes/General/RN-iOSSDK-10.3/




openURL



When a third party application invokes openURL: on a tel://, facetime://, or facetime-audio:// URL, iOS displays a prompt and requires user confirmation before dialing.








share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 12 at 11:43









Arie Pinto

678614




678614












  • yes, I read it, I'm now looking for a way to make it in background, automatically.
    – biggreentree
    Nov 12 at 11:46


















  • yes, I read it, I'm now looking for a way to make it in background, automatically.
    – biggreentree
    Nov 12 at 11:46
















yes, I read it, I'm now looking for a way to make it in background, automatically.
– biggreentree
Nov 12 at 11:46




yes, I read it, I'm now looking for a way to make it in background, automatically.
– biggreentree
Nov 12 at 11:46



Popular posts from this blog

List item for chat from Array inside array React Native

Thiostrepton

Caerphilly