in Swift how to make a phone call with no confirmation dialog? [duplicate]
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
swift phone-call
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.
add a comment |
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
swift phone-call
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
add a comment |
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
swift phone-call
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
swift phone-call
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
yes, I read it, I'm now looking for a way to make it in background, automatically.
– biggreentree
Nov 12 at 11:46
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
yes, I read it, I'm now looking for a way to make it in background, automatically.
– biggreentree
Nov 12 at 11:46
add a comment |
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.
yes, I read it, I'm now looking for a way to make it in background, automatically.
– biggreentree
Nov 12 at 11:46
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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