Failure to import localization in Xcode: (group) must not be nil

I am trying to import localization files using Xcode and xcodebuild .

I get the following output from xcodebuild -importLocalizations -project foo.xcodeproj -localizationPath ~/translations/foo/fi.xliff :

 2016-03-31 12:56:38.464 xcodebuild[8446:350058] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-10183.3/IDEFoundation/Localization/IDELocalizationWork.m:177 Details: (group) should not be nil. Object: <IDELocalizationWork> Method: +groupStreamFromFileReference:language: Thread: <NSThread: 0x7fde32605b30>{number = 1, name = main} Hints: None Backtrace: 0 -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation) 1 _DVTAssertionHandler (in DVTFoundation) 2 _DVTAssertionFailureHandler (in DVTFoundation) 3 __61+[IDELocalizationWork groupStreamFromFileReference:language:]_block_invoke_2.252 (in IDEFoundation) 4 __33-[IDEStream(IDEStreamMonad) map:]_block_invoke (in IDEFoundation) 5 __24-[_IDEStreamMap onNext:]_block_invoke_4 (in IDEFoundation) 6 -[_DVTTimeSlicedMainThreadOrderedUniquingWorkQueue _processWorkItemsWithDeadline:] (in DVTAbort trap: 6 

I suspect this failure is causing Xcode to crash. Any idea how to solve this problem?

+6
source share
3 answers

It seems that I was missing some translatable files from my project.

This problem was resolved when I added Localizable.strings and its localization, I also added InfoPlist.strings and its localization, but I am not sure if this had anything to do with the problem.

I also had to add the missing files to the translated xliff files, I assume it was missing (group) from the error message.

+1
source

After spending a lot of time on this, I found out that Apple has released an update for Xcode (7.3.1), which is likely to solve this problem for you (it was for me).

0
source

In my case, this was caused by Xcode says that Infoplist.strings already exists when I import the localization .

After deleting both the link to InfoPlist.strings and the file itself from the Xcode project, the above failure did not occur.

0
source

All Articles