$ grep -r Tag: «баги»

-rw-r--r-- 1.2K Oct 14, 2015 · 1821E8C · ~1 min

Xcode 7 Bug with [NSLocalizableString length]

шпаргалки баги xcode

Xcode 7 has a localization bug where the app crashes while calling [NSLocalizableString length] over and over again. I hit it in my project because some of my xibs were outside the project folder itself, in the Base.lproj folder. As a result, every time something from those xibs was loaded in the app, it crashed for no obvious reason. In the latest Xcode 6 everything worked perfectly. I managed to fix it by renaming Base.lproj to en.lproj and adding the files from that folder to the project again.

There are a couple more solutions on Stack Overflow; the idea is the same, but for some people it was enough just to toggle the Use Base Localization checkbox on and off, or mark English for the Storyboard file. But that is more for people whose entire UI is drawn inside a Storyboard. There is also a thread on the Apple developer forums.

The bug seems to have been around in Xcode 7 for a while; I think it was present in the betas too. It is still there in the current 7.01 release. Hopefully they will fix it in the near future.

[↵] open page bag-xcode-7-s-nslocalizablestring-length-.md
makoni@arm1:~/blog$ cd .. // ↵ back to all posts