2

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
Bill
  • 44,502
  • 24
  • 122
  • 213
toblerpwn
  • 5,415
  • 8
  • 38
  • 46
  • I've had this problem before and it turned out that it was because of any issue in my "Copy Bundle Resources" section of the build settings (one of the files in this list had actually been deleted since and was missing, so was displayed with a red notification on this page). Once I fixed that, XCode stopped crashing when I added a localization. You could always have a quick check to see if that's the same problem. – Clafou Sep 11 '12 at 11:21
  • not the case for me - but maybe for others :) – toblerpwn Sep 11 '12 at 20:17

4 Answers4

1
  1. Go to project and add new languages.(you might receive some path error)
  2. Go localize.string file,uncheck your english in inspector pane.
  3. Copy de.lproj(your language project) inside the en.lproj folder in finder and delete from outside.
  4. Now add manually your de.lproj string file in your project.
  5. Now enable english as well.
jatin
  • 181
  • 7
0

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?

toblerpwn
  • 5,415
  • 8
  • 38
  • 46
  • marking this as the answer to 'close' this issue; not sure if it's still an issue in Xcode 4.5, but will start a separate Question if so – toblerpwn Oct 05 '12 at 04:50
0

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!

Bill
  • 44,502
  • 24
  • 122
  • 213
0

Being a lazy bastard, I didn't want to recreate a new project with all the hassle of reconfiguring the whole show.

Here's what I did to fix the problem: I copied my storyboards somewhere else and removed them from the project. Then I moved them in my source folder (NOT in a xxx.lproj folder) and re-added them in my project.

Afterwards, I was able to add a new language in the project settings. Talam, case closed.

Jean Le Moignan
  • 22,158
  • 3
  • 31
  • 37