Optional group with PSToogleSwitch - iphone

I'd like to have a settings bundle behavior similar to the iPhone WiFi settings.
If you select the toggle switch and set it to on, an optional group with the specific settings appears. How is this done? I haven't found any clue by now.

If you are writing a preferences bundle yourself (jailbreak-level), you can dynamically add and remove PSSpecifiers in your switch's "set" selector. If this is for an App Store application, I do not believe that is possible (in which case, I would suggest attempting to integrate these preferences into your application, where you have code-level control over their display and setup.)

Related

Copy and pasting selected text from the current, from a Mac sandboxed application

I am trying, from a sandboxed menubar application, to get the selected (highlighted) text in the current application.
I was using accessibility before and traversing the main menu of the application until finding the copy item but unfortunately, I need to sandbox the application and this is no more a valid approach.
I would like to simulate the ⌘ + C keyboard shortcut but so far all my attempts failed.
so far all my attempts failed
There is a reason for that...
A core purpose of the sandbox is to provide isolation between applications, to prevent one application from accessing the data of another. So what you are asking is how to break out of the sandbox...
If you are writing accessibility software take a look at How to use Accessibility with sandboxed app? for maybe the smallest glimmer of a hope.
Otherwise your current path is a (hopefully, its a sandbox) dead-end, security has a price, sorry.

Define Settings programmatically

Is it possible to define the Root.plist in the Settings.bundle programmatically?
In the Settings – Mail, Contacts, Calendars, I can see all my accounts. I would like to do something similar, by having a number of user accounts being saved in the settings. From what I read so far, it looks like it isn’t possible, but I would like to be sure. Please note that I’m not looking to have a “Add Account” feature in the settings, just a listing of several accounts (number of accounts variable).
It's not possible for anyone other than Apple. Third party developers have no way of programmatically changing the Settings bundle.

Settings bundle, want to show dynamic data from web-service

Hi I am stuck please help me...
Is it possible to load dynamic data in the settings bundle, exactly what i need is when user sets a value for a preference, i need to display a list for the next preference, this list should be drawn from an online database. I have seen some thing similar in iPhone's default settings. Can anybody please give a solution for this as i am really screwed now. If it is not possible then i will include the settings in the app itself.
Thanks in advance
It is not possible to have dynamic values in Apple's settings application; they need to be specified in Settings.bundle before compilation. I recommend you implement a custom settings screen.

iPhone Settings Menu - creating a list that allows user to add, edit and delete items

I am looking to create a settings menu feature that allows users to add, edit and remove items from a list. In adding an item to the list, the user will then be prompted to add some further sub-data such as name, value etc. The list should only allow one item to be selected. As far as I can see this is similar to, but beyond the capability of the PSMultiValueSpecifier, in terms of the user adds/edits/deletes and sub-data being added.
Similar functionality is implemented in the ‘Choose A Network’ section of the iPhone’s Wi-Fi settings but I am not sure how this is done. In this, users can add a new network and then specify security type, password etc.
Any ideas how I might go about achieving this?
Do a search in sample code regarding UITableView (In iPhone dev center or inside Documentation), I am sure I have seen that kind of sample ;)

iPhone settings bundle

I want to allow the user to enter a valid date using the iPhone’s settings application.
I have experimented with many of the PreferenceSpecifiers data node types including date.
I have two issues:
When I specify date as the type, my app within the settings app crashes. Working examples would be greatly appreciated.
Since this approach hasn’t worked for me yet, will I programmatically be able to validate the date that the user enters?
The answer to number 2 is no. The only time you can validate the data entered is the next time your app is launched. None of your app's code is run via the Settings app.
You might consider pulling this setting into your app.
Have you read this guide and this section of the App guide? They describe in detail how the settings like this work.
You won't be able to validate anything a user sets through the Settings application. Also, I don't see Date as a valid setting type anywhere, so I don't even think this is possible through the Settings application.
I would simply create a settings view within the application. That way you can control your custom logic as you see fit.