简体   繁体   English

如何在用户授予权限后以编程方式发送短信?

[英]How to programmatically send a text message after the user has given permission?

I'm writing an app where I need to be able to send texts in the background. 我正在编写一个应用程序,我需要能够在后台发送文本。 I saw this very comprehensive answer to a similar question that explains how to send text messages through an interface with the user and the various limitations of sending messages programmatically, but it didn't really address another possibility: is it possible for the user to grant permission to my app to send messages in the background similar to how the user must grant permission to an app to access the user's photos? 我看到了一个类似问题的非常全面的答案 ,该问题解释了如何通过与用户的接口发送文本消息以及以编程方式发送消息的各种限制,但它并没有真正解决另一种可能性:用户是否可以授予允许我的应用在后台发送消息,类似于用户必须如何授予应用访问用户照片的权限? For example, upon starting up the app for the first time, a prompt appears asking the user for permission to send text messages. 例如,在第一次启动应用程序时,会出现一个提示,要求用户发送短信。 If the user grants permission, then the app can send messages in the background. 如果用户授予权限,则应用可以在后台发送消息。 Is that possible? 那可能吗?

The answer to this question is that you can't. 这个问题的答案是你不能。 There are some jailbreak apps that accomplish this but they require just that, a jailbreak (and private APIs). 有一些越狱应用程序可以实现这一目标,但它们只需要越狱(和私有API)。 There is no App Store allowed way to do this. App Store没有允许这样做的方法。

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

相关问题 我如何在首次启动后请求用户许可发送本地通知? - How do I ask the user for permission to send local notifications after initial launch? iOS-以编程方式拒绝对联系人的许可(在用户接受之后) - iOS - programatically rejecting permission to contacts (after user has accepted) 离开屏幕后,如何将消息发送到当前选定的表格单元格? - How can I send a message to the currently selected table cell after it has moved off-screen? 有没有一种方法可以通过编程方式发送消息,而无需用户点击屏幕来确认发送消息,而只是使用语音命令? - Is there a way to send a message programmatically without user having to tap on screen to confirm sending the message, but just to use voice commands? 以编程方式通过Xcode发送消息 - send a message through Xcode programmatically 以编程方式发送Firebase云消息? - Send Firebase Cloud Message programmatically? 如何从iPad发送短信(短信) - How to send SMS (Text Message) From iPad 如何检查用户是否已授予特定权限Facebook iOS - How to check if a user has granted a certain permission Facebook iOS iOS 13 - 如何检查用户是否已接受蓝牙权限? - iOS 13 - How to check if user has accepted Bluetooth permission? ReactNative:如何检查用户是否已授予gps权限 - ReactNative: How to check if the user has granted permission to gps
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM