Xcode crashes when adding a new language for localization/translation

Whenever I add a new language to Xcode (Project -> Localizations -> +), Xcode crashes immediately. Here is the error:

Process:         Xcode [1362]
Path:            /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:      com.apple.dt.Xcode
Version:         4.4.1 (1488)
Build Info:      IDEApplication-1488000000000000~2
App Item ID:     497799835
App External ID: 9950605
Code Type:       X86-64 (Native)
Parent Process:  launchd [132]
User ID:         501

Date/Time:       2012-09-10 11:53:15.906 -0700
OS Version:      Mac OS X 10.8.1 (12B19)
Report Version:  10

Interval Since Last Report:          3309 sec
Crashes Since Last Report:           5
Per-App Interval Since Last Report:  3139 sec
Per-App Crashes Since Last Report:   5
Anonymous UUID:                      6F2A1E95-B759-4403-BA5B-A1D00B69A631

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
ProductBuildVersion: 4F1003
ASSERTION FAILURE in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-1559/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/Xcode3Model/Xcode3VariantGroup.m:709
Details:  Assertion failed: [newFilePathString hasPrefix:self.resolvedFilePath.pathString]
Object:   <Xcode3VariantGroup: 0x4017fbe00>
Method:   -addNewReferenceForLocale:filePath:fileType:
Thread:   <NSThread: 0x40030a220>{name = (null), num = 1}
Hints:   None

Answers


I've found an identical thread on the Apple Developer Forum:

https://devforums.apple.com/thread/166062?tstart=0

The solution there is to create a new project and drop all your source files in it? Sweet jesus.

EDIT: here's a terrible, hacky fix that worked for me: you can individually 'un-localize' all of your files (uncheck English in your files' Inspector pane), then go to Project -> Localizations -> +, and now adding langs seems to work for me. Seems to have something to do with Xcode not being able to add a lang & localize many objects at once?


I was running into this problem too (but in Xcode 7). I solved it like this:

  1. Remove the plist from the project (but keep the file on disk).
  2. In the finder, copy the plist file from your base localization (e.g. en.lproj) to the other lproj folders.
  3. Add the plist file from each lproj, one by one, to your project.
  4. The plist file will appear in Xcode as a tree of localized files, just as if you'd successfully used the Localize checkboxes.

Hope that helps!


Need Your Help

iPhone - What is the correct way to implement the UIScrollView?

iphone controller scrollview

I have two UIViewControllers each with their own nib files. Each controller serves a different purpose. The idea was to add a UIScrollController and add both UIViewControllers to it so the user can

Strongly name three assemblies that reference each other

c# .net windows dependencies strongname

This is probably really easy, but I'm stumped (and I'm a noob with c#). I have 3 assemblies that reference each other (for example, registering for notification of a delegate method, or calling a ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.