FifiTheBulldog / ios-settings-urls

A collection of iOS Settings URLs
1.29k stars 99 forks source link

Is there a known URL for Charging Optimization? #52

Open WaitingForGuacamole opened 9 months ago

WaitingForGuacamole commented 9 months ago

I'm trying to get to the Charging Optimization page under Battery -> Battery Health & Charging. I've tried the following:

prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH, and that gets me to the Battery Health page - great start. To try to go deeper, I've tried

prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH/Charging%20Optimization
prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH/CHARGING_OPTIMIZATION
prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH#Charging%20Optimization
prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH#CHARGING_OPTIMIZATION
prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH#Charging
prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH#CHARGING

Has anyone had success with this?

THX723 commented 9 months ago

Also very interested in this and have tried various combinations without success.

rodalpho commented 9 months ago

Came here looking for the same thing, and tried many of the same URLs as the first poster.

marcodestefano commented 9 months ago

Also tried:

prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH/OPTIMIZED_CHARGE
prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH/OPTIMIZED_CHARGING
prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH/OPTIMIZATION
prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH/OPTIMIZED%20CHARGE
prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH/OPTIMIZED%20CHARGING

But didn’t work either

colin273 commented 9 months ago

This seems to work, but only when my device language is US English: prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH#Optimized%20Battery%20Charging

atnbueno commented 9 months ago

prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH#Optimized%20Battery%20Charging works as-is in my Spanish iPhone

WaitingForGuacamole commented 9 months ago

That does not work for me, still takes me to the Battery Health & Charging page, not the Charging Optimization page.

image

NOTE: that is %20, not %2O in the screenshot

colin273 commented 9 months ago

Is that a separate page on your device? For me, "Optimize Battery Charging" is a single switch on the Battery Health page.

Settings: Battery Health & Charging

THX723 commented 9 months ago

@colin273 I'm guessing you have the iPhone 15 (non-Pro)? 'Charging Optimization' screen is only available for the 15 Pro

image

WaitingForGuacamole commented 9 months ago

Yeah, it's a subpage that shows three options, one for optimized battery charging, one for the 80% limit, one for none. that's why I want this so bad, it's yet another level of setting.

I have a iPhone 15 Pro.

colin273 commented 9 months ago

I have an SE 2020 (hence the notchless status bar). That explains why I don't see the page.

I've looked around in system files, but so far I've come up empty. The search manifests don't seem to contain any useful information, and the battery settings bundle and its binary aren't much help either.

Edit: the key for the "Optimized Charging" string in the relevant loctable is CHARGING_TITLE. I have no idea whether that's useful.

WaitingForGuacamole commented 9 months ago

Certainly appreciate you taking a look around for us!

ShakataGaNai commented 9 months ago

prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH#Optimized%20Battery%20Charging

Does not work (iPhone 15 Pro Max, USA, iOS 17.0.2). Copied exactly as shown here on github and the shortcut drops you in one step short of "Charging Optimization" screen. https://www.youtube.com/shorts/rWbW6XgCUF8

colin273 commented 9 months ago

The URL I sent earlier takes me directly to the "Optimize Battery Charging" switch in my settings. The path to the "Charging Optimization" page, and even the bar to access it on the Battery Health page, is almost certainly different for iPhone 15 Pro models, since it's effectively a different settings item that just happens to generally control the same thing.

rodalpho commented 9 months ago

That URL definitely does not work on iPhone 15 pro, unfortunately.

marcodestefano commented 9 months ago

Based on all other setting urls, I’d find weird to have one url that is working depending on the language set in the phone

samuelgrf commented 7 months ago

The optimized charging setting is also available on the regular iPhone 15, at least on iOS 17.

Unfortunately the posted link doesn’t work on it either. I tried:

prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH%23Optimized%20Battery%20Charging

both with Region and language set to USA/English US.

chrisharper22 commented 6 months ago

So, I'm doing some digging behind this. I'll try to explain this in some terms that will simplify this.

It seems like the URLs are based on the identifiers of the nested specifiers. So, it turns out Optimized Charging on non-iPhone 15 devices is indeed Optimized Battery Charging which is why it works on said devices. I'm thinking that at runtime, the view loads and checks whether if it is a iPhone 15 model, and then picks which specifier to use. This means its identifier is possibly different for iPhone 15 models.

chrisharper22 commented 6 months ago

Tried these so far... nothing.

mercuryLuz commented 3 months ago

With iOS 17.4 (which restructured the "Battery Health"/"Charging Optimization" menus) and iPhone 15 Pro (or potentially any future models) supporting the 80% Limit, I found with some trial and error (and thanks to the previous work by commenters such as @colin273 & @chrisharper22 ) that this URL directly opens the menu "Battery > Charging Optimization" (at least with system language set to EN-US): prefs:root=BATTERY_USAGE&path=CHARGING_TITLE

It's better than nothing when trying to quickly enable/disable the 80% Limit via Shortcuts... Is there any way to extend this URL to also directly select one of the three available options within this menu?

kamui commented 1 month ago

CHARGING_TITLE doesn't work on iPadOS, but this does: prefs:root=BATTERY_USAGE&path=BATTERY_HEALTH_TITLE

rushitshukl commented 4 weeks ago

I am on iOS 17.5.1 with an iPhone 14 and this URL is working perfectly! Finally found it, thanks!!

chrisharper22 commented 6 days ago

Is there any way to extend this URL to also directly select one of the three available options within this menu?

As of right now, Apple prevents this behavior with Shortcuts, most likely from downloaded Shortcuts from changing system settings without acknowledgement.