Author Topic: Sorting inside Settings.bundle  (Read 213 times)

Tolik85

  • Jr. Members
  • **
  • Posts: 77
  • Reputation: 0
Sorting inside Settings.bundle
« on: January 13, 2013, 03:27:22 am »
My application's languages are English and German. I have localized my settings bundle to German.

One of my pages (in the Settings.app) includes topics. I have added them in the settings.bundle in an English alphabetical order (Topics.plist). I have Topics.strings which translates every topic to German. Of course the order of the topics remain as in English, which is not correct.

Is there a way to fix it?

I need some way to read this plist into an array, sort it, and return it back to the settings.bundle. I am not sure if I can write directly to Settings.bundle.

The line:
BOOL success = [dict writeToFile:[[NSBundle mainBundle] pathForResource:@"Settings.bundle/Topics" ofType:@"plist"] atomically:YES];

This line returns YES on iPhone 4S 5.1.1 and NO on iPhone 5 6.0.2. I guess Apple fixed this in iOS6, am I correct?

Please help me solve my problem and make the topics in the Settings.bundle appear alphabetically sorted both in English and in German.

Thanks!