After reading your comment, I was interested in whether or not I could achieve this through the built-in Shortcuts app. Unfortunately, "Restart" is not an available action.
Edit: Actually, I was looking in the wrong place. It’s an option for the "Shut Down” action. Thanks, @jwond!
Yeah shortcuts could be much more useful. I wanted to make a post request when I arrive at some place with some additional javascript logic to update an authentication token. It just doesn’t work when running in the background, I have to manually trigger it
While we're on the topic of Shortcuts, does anyone know how to do decent data transfer? I've been wracking my head to figure out how to replace my termux script on Android that would sync photos to my home computer whenever I was on my local wifi (or wifi and tailscale).
I know shortcuts has an ssh action but it appears quite buggy and if I try to do any real bash scripting or wanting to not overwrite existing backups it hangs. It doesn't handle
[[ ! -a "$FILE" ]] && cat /dev/stdin "$FILE"
Even with more formal if statement notation. Best I have come up with is a very painful shortcut that repeats this for each thing I want to sync
if [[ ! -a "$FILE" ]];
then
cat /dev/stdin "$FILE"
else
cat /dev/stdin /dev/null
fi
Seems to hate functions. iSH and others can't seem to access the photos library. There's got to be some way I can get those out of the sandbox. (God damn is the app buggy. This is worse than programming in brainfuck)
I am using an app for this. It's called WebDavNav+ and there is a free version WebDavNav for evaluation.
You can create sync configurations and switch on auto sync.
I have an Odroid HC4 with Open Media Vault and docker which is my personal NAS. It runs a WebDav container and so on a daily basis my iPhone is backing up photos to my NAS using WebDavNav+.
Thanks! I mean I don't need anything fancy and honestly, I don't want to run a web server (I will if that's what's needed, it's better than this Shortcuts hell). I feel I shouldn't need fancy tools to do some pretty basic things, you know?
I'll be honest, I'm just a bit pissed Apple intentionally handicaps powerusers, and pushes people into their paid solutions. It's one thing to offer a paid solution, it's another thing to create a problem and then sell the solution. I mean just an iCloud backup isn't even good enough. Don't they know 3-2-1?
I see your point. I already had the NAS in place so it was a nobrainer for me, but if you just want to backup to computer you can still run a light webdav server on your computer. For example, I am using dufs [0], which is very easy to deploy and configure.
Just tried it. Unfortunately, even when you choose "Run Immediately", it still asks for user input when the time comes ("Are you sure you want to restart this iPhone?")
Thank you very much. I've wanted to have a weekly reboot of my phone for years now, and it drove me nuts that I couldn't create a shortcuts automation for it.
Unfortunately not. Looks like you can set the time (or choose sunrise or sunset), and then you can set it to repeat daily, weekly, or monthly. No option based on inactivity.
However, you can set it to shutdown or reboot if it receives an email that contains a specific string in the subject line. So you could have a computer that sends it a shutdown email. You could base it off of inactivity of that computer, or you could have it listen for a cancel-shutdown email, which could be sent by the iPhone when it connects to WiFi (assuming you don't live someplace like a university campus where you're always connected to WiFi even when you leave home.) If the computer doesn't receive the cancel-shutdown email within the set period of time, the computer would send the shutdown/reboot email to the iPhone.
However, like another commenter pointed out [1], the action doesn't even seem to work currently as of iOS 18.0.1. If you set it to "Run Immediately" with "Notify When Run" to off, it just doesn't run. If you turn "Notify When Run" on, the action runs, but still requires you to confirm it manually with a tap, which defeats the purpose of the automation. Who knows, maybe a future update will fix it.
Find My already gives notifications when a device gets separated from your other mobile devices including Airtags. Apple could add extra actions on top of that to automatically mark as lost, reboot, or erase.
18h is the default on GrapheneOS IIRC. Got my phone stolen abroad days ago with tones of sensitive data and that features was a big reassurance. I set it to 6h I believe.
I tried to do it using Tasker on my crDroid device, but it requires the phone to be rooted, which mine isn't since some apps detect it and throw a fit.
Your shortcut likely isn’t working. I tried it, but it didn’t reboot at the scheduled time. It briefly turned on to show a dialog asking for confirmation, but since it was unattended, no one approved it, so it never restarted. You can confirm it’s failing by scheduling it to go off while you’re there, or download a System Status app that shows boot time.
My guess would be that the three-day timer is the first version to test the waters. Put it out there to see if there are any unexpected problems. And if everything's peachy, lower it in some future release to make it more secure.
If they went with something more aggressive (like 24 hours) it might annoy more users, especially those who keep their phones locked for a while but don't use them constantly
I imagine the number of people who don't unlock their iPhones in ≥24 hours is a vanishingly small percentage of the userbase. Especially since with new iPhones, just looking at the lockscreen with your face unobscured is enough to unlock it.
I imagine a vanishingly small percentage of the user base is still a very large number of people, that as an absolute number, would make up a significant percentage of the users of any other product.
Apple’s scale is so large, it’s easy to forget even tiny percentages are still actually really significant in absolute terms.
Users that have an iPhone just for work would be affected with a 24h check. Even with 72h they might be affected, but it would be fewer (if you assume they work Fridays and Mondays)
Your phone knows how often you normally use it. It could do something intelligent based on a usage pattern to restart when there’s an unusually long gap.
I can see this being too hard to explain compared to “reboots after 72 hours.”
I am almost never use my phone at home anymore. And even when I leave home for gym or stuff like that, I will have my phone with me, but will interact most of the time with the apple watch. The only few times I will actually use the phone is to answer some urgent message.
For lazy reading and media consumption I will use the ipad.