Xcode 8 import localization

Xcode (8.1) crashes when importing localization for my project. It also crashes when exporting and then importing the same xliff file unchanged.

Here is the xliff file: http://ge.tt/7J5UY3i2

Here is the complete crash report http://pastebin.com/JsJFeCqB . Any tips or workarounds for this?

Application Specific Information:
ProductBuildVersion: 8B62
UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[Xcode3VariantGroup addToTargetDefaultResourcesBuildPhase:]: unrecognized selector sent to instance 0x7fe69615cba0
UserInfo: (null)
Hints: None

Backtrace:
  0   __exceptionPreprocess (in CoreFoundation)
  1   DVTFailureHintExceptionPreprocessor (in DVTFoundation)
  2   objc_exception_throw (in libobjc.A.dylib)
  3   -[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation)
  4   ___forwarding___ (in CoreFoundation)
  5   _CF_forwarding_prep_0 (in CoreFoundation)
  6   __81+[IDELocalizationWork fileReferenceStreamForName:directoryPath:superitem:target:]_block_invoke (in IDEFoundation)
  7   __33-[IDEStream(IDEStreamMonad) map:]_block_invoke (in IDEFoundation)
  8   __24-[_IDEStreamMap onNext:]_block_invoke_4 (in IDEFoundation)
  9   -[_DVTTimeSlicedMainThreadOrderedUniquingWorkQueue _processWorkItemsWithDeadline:] (in DVTFoundation)
 10   -[DVTTimeSlicedMainThreadWorkQueue _processWithDeadline:] (in DVTFoundation)
 11   -[_DVTTimeSlicedMainThreadActiveWorkQueues _processWorkQueuesOnDeadline] (in DVTFoundation)
 12   __NSFireDelayedPerform (in Foundation)
 13   __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation)
 14   __CFRunLoopDoTimer (in CoreFoundation)
 15   __CFRunLoopDoTimers (in CoreFoundation)
 16   __CFRunLoopRun (in CoreFoundation)
 17   CFRunLoopRunSpecific (in CoreFoundation)
 18   RunCurrentEventLoopInMode (in HIToolbox)
 19   ReceiveNextEventCommon (in HIToolbox)
 20   _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
 21   _DPSNextEvent (in AppKit)
 22   -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
 23   -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
 24   -[NSApplication run] (in AppKit)
 25   NSApplicationMain (in AppKit)
 26   start (in libdyld.dylib)
+4
source share
2 answers

. / , . , info.plist , , xliff exception hell. , , , , .

, , . Xcode . - , xcodebuild:

xcodebuild -verbose -importLocalizations -localizationPath "lang.xliff" -project ./myProject.xcodeproj
  • info.plist. InfoPlist.Strings . , lang.lproj. , info.plist lang.lproj, base.lproj.

  • Settings.bundle lang.lproj. Root.strings, . "Root.strings", iOS, iOS-.

  • . , , . Localized.Strings . .

  • base.lproj en.lproj, en.lproj, .

  • XLIFF , , .

  • , , , Xcode 7 , , , , .

python xliff. , , : https://github.com/danloughney/xliffHell

+2

. " XLIFF , . , XCode 8.1, , , XLIFF, .

0

Source: https://habr.com/ru/post/1664967/


All Articles