Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a button to an iPhone prefs / settings bundle?

Just wondering if it's possible to add a button like the "Clear History", "Clear Cookies" etc buttons in the Safari preferences to your own app's settings bundle? Been digging through the dev docs and can't find any plist specifier for a button, so I'm wondering if this is an internal API for the Apple guys?

After you hit the button, you get an action sheet asking you whether you really want to do it, and then presumably there is some callback based on the user's input.

Also noticed that the Nike + iPod settings have a clear button in them, but again, that app might have access to internal APIs that we don't.

alt text

like image 271
glenc Avatar asked Dec 22 '22 22:12

glenc


2 Answers

No, this is not possible. The system only supports interacting with the values from within your app. You can't run code from the settings app so a button would be useless.

like image 95
Rengers Avatar answered Jan 05 '23 17:01

Rengers


Nike+iPod is a root application. Anything running under root can run code from basically anywhere (with restrictions, Sandbox is a b**ch) If you're interested you can make a jailbreak preferencebundle with Theos or iOSOpenDev! Which allows you to make a root bundle that can run button action code.

like image 42
Haifisch Avatar answered Jan 05 '23 17:01

Haifisch