Can you programmatically toggle Do Not Disturb mode in iOS 8 (w/ Swift)?

后端 未结 2 1902
礼貌的吻别
礼貌的吻别 2021-01-12 06:47

Doing some research on this, it looks like you couldn\'t toggle Do Not Disturb mode in iOS 6 or 7. Wondering if you can do it in iOS 8. I can\'t find anything in Apple\'s do

2条回答
  •  长情又很酷
    2021-01-12 07:22

    This functionality would be outside of the sandbox that Apple puts each application in. Contact between apps and contact outside of the sandbox is very restricted. One example that Apple lets you get away with is turning on the flashlight, but like AirPlane mode, Do Not Disturb (should be) is restricted. Here is some more information on the the sandbox.

提交回复
热议问题