How can you control the logic of an iPhone pre-generated settings (bundle) pane - iphone

How can I control the logic of say 5 "automatically generated" on/off switches using a method similar to this http://knol.google.com/k/iphone-sdk-application-preferences?pli=1# when the app isn't running. Some of my settings are contingent on other settings being on or off. IE setting logical gates for this plist's pre-generated settings view. I have this working in my App but I can't have my app having invalid settings because of 5 on/off switches that are independent of each other because the app can't currently control them, when I need some of them linked. So basically I just disable this pane, and the user can only change settings in the app. It would be nice to using the "General" Settings app...
Thanks

The only way to do this would be to validate the current App Settings on startup and notify the user if you discover problems with the settings.

Related

Set default app as ON in Active Screen ios xcode

Now i am using swift to code my app. I used share extentions and it runs well.
But I have a problem.
app set default value in active screen as OFF. I want to set default as ON. Do you have any solution?
Thank you
By default, share extensions are turned off until the user manually enables them with the More... menu. That's just how iOS works and there is nothing you can do about it, other than instruct your user to open the share dialog and hit More to enable your app.
Only apps like Vimeo which have an agreement with Apple can default to visible in the share menu.
Source + more information.

iPhone Settings.bundle - how to disable/enable a setting based on other settings?

Hard to explain, but luckily there's an example. On an iPhone, when you go to Settings > Nike + iPod, in the app's settings, when you set Nike+iPod to off, it disables the rest of the settings. How do I do that? Use one setting to disable or toggle off another setting?
For AppStore apps, no you can't do that, period.
Detail: Nike+iPod is using a different mechanism known as "Preferences Bundle", which allows more kinds of specifiers (e.g. buttons) and running code. To disable settings live, one need codes. "Settings Bundle" which AppStore allows cannot run code. So that cannot be done.

Hide Settings Bundle in Settings.app

I have created an iOS 4.0 app with a Settings bundle. I am using the InAppSettingsKit (http://www.inappsettingskit.com) which presents the settings in the app. This allows the user to modify those settings directly from within the app, without the need to go to the external iPhone Settings.app. As the settings are accessible from inside the app (and I am doing some custom styling to the in-app settings screen) I would like to stop the Settings bundle from appearing in the iPhone Settings.app. Is this possible?
Any help would be greatly appreciated.
InAppSettingKit allows the use of an internal only settings bundle. Rename Settings.bundle to be this and then the OS wont find it to put it in the Main Settings part
Check out "Some little extras" on the product page

Display iphone application settings within your application

The iphone supports a means of defining your application's settings such that it will automatically create a UI in the Settings app. I want to also allow the user to edit the application settings within the application but it'd be nice to reuse the same UI that is automatically created.
See: Application Settings
Is there a way to have your application display the settings using the same UI that the Settings application does?
No there is not a way to reuse the UI.
There is, however, a way to reuse the data. Settings.app will put the settings in NSUserDefaults under the keys specified in your Settings.bundle plist file. You can alter those values in your app, then switch to Settings.app and see that it will have changed to reflect your new values. This is really nice if you want to allow the user to edit settings in the app (if that's what they're used to) or in Settings.app (if that's what they're used to).
EDIT #1
You may want to look at this thread. There is a library called mySettings that would make building this easier.
EDIT #2
There are a couple libraries available now that do this:
InAppSettings
InAppSettingsKit

Can you put a button in the Preferences for your iPhone app?

I'm building an iphone app, and I wanna use the iPhone's built in Preferences stuff. It looks like I put options in there, but I'm interested in putting a Reset button in the Prefs. I see that Apple's built-in apps like Safari have buttons in their prefs (Clear History, Clear Cookies, etc). I don't see a way to do this for SDK apps. Help!
Your Settings bundle cannot contain any runnable code, so it's not possible to have buttons like safari (Clear History, Clear Cookies, etc).
Safari is a builtin application provided by Apple, therefore it has access to apis/privileges that normal AppStore applications don't.
You can see the list of possible elements here.
One thing you can do, since you can set your own app's preferences during runtime, is create a "Reset preferences on next run" toggle.
When your app starts up, check for this setting and act accordingly if it is set to "On". Don't forget to reset the toggle as well. ;-)
Here's a Q&A that explains how to do this: How to change the app preference settings through code?