iPhone settings bundle

1.9k views Asked by At

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:

  1. When I specify date as the type, my app within the settings app crashes. Working examples would be greatly appreciated.

  2. Since this approach hasn’t worked for me yet, will I programmatically be able to validate the date that the user enters?

2

There are 2 answers

0
Patrick Burleson On

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.

0
Ben S On

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.