Can Settings bundle use values from application's Info.plist file?

Posted by delirus on Stack Overflow See other posts from Stack Overflow or by delirus
Published on 2011-01-16T18:46:41Z Indexed on 2011/01/16 18:53 UTC
Read the original article Hit count: 151

Filed under:
|

Hi,

is it possible to use values from application's Info.plist file as DefaultValue value for items in Settings.bundle? For example CFBundleVersion. I've tried entering it as ${CFBundleVersion} but it didn't work. I've also tried changing DefaultValue type but with no success. Any ideas?

The reasons behind are simple:

  • CFBundleVersion is known at compile time, so I won't have to take its value from application's mainBundle and then apply that value to NSUserDefaults.
  • Other reason is that just after installing the app, but before running it, Settings bundle values are not in-sync as the code setting NSUserDefaults did not have a chance to execute itself... so it would be boring to always remember that I have to change my Settings bundle values manually.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about xcode