简体   繁体   English

Javascript 锁定/关闭 iPhone?

[英]Javascript to lock/turn iPhone off?

i'm messing around with the automation features on iOS and i'm putting some together that will prompt me with options of other things to do upon opening tiktok (instead of… deleting it)我正在弄乱 iOS 上的自动化功能,我将一些放在一起,这将提示我在打开 tiktok 时可以选择做其他事情(而不是……删除它)

right now i have a list that pops up when i open it, and when i click an option like “journal” it opens spotify so i can put my background music on现在我有一个列表,当我打开它时会弹出,当我单击“journal”之类的选项时,它会打开 spotify,这样我就可以播放背景音乐了

for some of my options like reading a book, i'd like to be able to select it and my phone immediately turns off对于我的一些选择,比如读书,我希望能够拨打 select,我的手机会立即关闭

right now i have it set to return to the homescreen, but i found an option that allows me to run Javascript on a webpage现在我将它设置为返回主屏幕,但我找到了一个选项,允许我在网页上运行 Javascript

is it possible to write something that would turn my phone off?有没有可能写一些东西来关闭我的手机? I understand this is a little convoluted when the power button is right there but it's not for me, it's for the adhd我知道当电源按钮就在那里时这有点令人费解,但它不适合我,它适合 adhd

In javascript it's impossible.在 javascript 中是不可能的。 You can do it in java or kotlin.您可以拨打 java 或 kotlin 办理。

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

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