简体   繁体   English

如何在 iOS swift 中以编程方式打开/关闭 DND“请勿打扰”模式

[英]how to turn On/Off DND “Do not Disturb” Mode programmatically in iOS swift

Is it possible to turn on/off "Do no disturb" for iPhone programmatically?是否可以以编程方式打开/关闭 iPhone 的“请勿打扰”?

I am making an app in which I want to programmatically start Do Not Disturb feature in iOS.我正在制作一个应用程序,我想在其中以编程方式启动 iOS 中的请勿打扰功能。 Can I able to fetch Do not disturb(DND) status from iPhone and Start DND from my app?我可以从 iPhone 获取请勿打扰(DND)状态并从我的应用程序中启动 DND 吗?

There is no API to manage DND status.没有 API 来管理 DND 状态。 The user must change it themselves.用户必须自己更改。

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

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