Sade Localizable.strings ishlatilgan, "haqiqiy" biri e'tiborsiz

OK, bu mening asabimga tushdi!

Men fayl bilan noto'g'ri ish qilgan bo'lishim kerak, lekin mening ilovam "tasavvur" lokalizable.stringsdan captionlarni ishlatadi. Faylning mazmunini buyon o'zgartirdim, ammo barcha o'zgarishlar e'tiborsiz qoldirildi.

  • I get the captions the "regular" way: NSLocalizedString(@"captionKey", nil)
  • any change to the Localizable.strings is ignored
  • if I delete the Localizable.strings reference and file, the app still displays proper captions!
  • With the nslocalizable.strings deleted, I've searched for any file containing my captions and got nothing, yet when I build they are displayed.
  • I've tried resetting the emulator, cleaning my project.. nothing. Still displaying old captions
  • Same issue on my iPhone
  • When I distribute the IPA over the air, this time, captions aren't displayed, just the keys

Iltimos yordam bering!

Edit: Following the comment from DarkDust I've deleted the app from iPhone, cleaned the project, built and run and the app now displays keys. Quite normal. But when I add a new Localizable.strings, it's being ignored. If it helps the code below logs (null):

NSLog (@ "% @", [[NSBundle bundleForClass: [self-class]] pathForResource: @ "Localizable" ofType: @ "strings"]);

1
Buni qildim. Bu safar ilovada kalitlarni aks ettiradi. So'ngra ba'zi tarkibga ega bo'lgan yangi "Localizable.strings" ni qo'shdik, yana tozalashdi, ilovani o'chirib tashladi va qurilma hali ham kalitlarni ko'rsatmoqda
qo'shib qo'ydi muallif Johann, manba
Ilovani telefondan o'chirib tashladingiz, so'ngra loyihangizni tozaladingizmi va ilovani yangiladingizmi?
qo'shib qo'ydi muallif DarkDust, manba
Bu juda jirkanch. Men bu masalani ko'rib chiqdim va keyin bir necha kundan so'ng hech qanday izoh berilmadi.
qo'shib qo'ydi muallif James, manba

1 javoblar

Ok found the issue. I had somehow messed up with the Build Rules (Xcode 4 -> select your target -> tab "Build Rules") There, I had a few "CopyStringsFile" rules that were not using "CopyStringFile". No idea how this happened. All I had to do was removing them (making sure at least one was left using "CopyStringFile")

Aqli narsalar

2
qo'shib qo'ydi