[英]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.