Xcode崩溃与基本本地化添加Info.plist本地化
我在一个快速的ios项目中使用Xcode 7.0.1的Base localization。
当试图添加Info.plist
的本地化版本时,Xcode可重复崩溃。
崩溃报告写道:
Process: Xcode [8668] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 7.0.1 (8228) Build Info: IDEFrameworks-8228000000000000~5 Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Xcode [8668] User ID: 501 Date/Time: 2016-02-09 20:19:34.068 +0100 OS Version: Mac OS X 10.11.3 (15D21) Report Version: 11 Anonymous UUID: 3E9F29CA-3434-1E64-B82C-450C0F5950BA Sleep/Wake UUID: E7AE7A3F-2138-4C7B-8C65-D550B9D39594 Time Awake Since Boot: 17000 seconds Time Since Wake: 8500 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: ProductBuildVersion: 7A1001 UNCAUGHT EXCEPTION (NSInvalidArgumentException): *** -[NSPathStore2 stringByAppendingPathExtension:]: nil argument UserInfo: (null) Hints: None Backtrace: 0 0x00007fff96b1baca __exceptionPreprocess (in CoreFoundation) 1 0x0000000100452734 DVTFailureHintExceptionPreprocessor (in DVTFoundation) 2 0x00007fff8ddf973c objc_exception_throw (in libobjc.A.dylib) 3 0x00007fff96b1b98d +[NSException raise:format:] (in CoreFoundation) 4 0x00007fff8b42ce6b -[NSPathStore2 stringByAppendingPathExtension:] (in Foundation) 5 0x0000000108cec86c -[Xcode3VariantGroup proposedFilePathForLocalization:fileType:] (in DevToolsCore) 6 0x000000011228ec8c -[Xcode3LocalizationCommands addLocalizedResourceWithDefaultLocale:variantGroup:inspectorLocale_locale:inspectorLocale_fileDataType:conversionFileDataType:fileDataType:allowsConversion:operationCompletionBlock:] (in Xcode3UI) 7 0x0000000112269c80 -[Xcode3LocalizationsInspector addResourceForInspectorLocale:] (in Xcode3UI) 8 0x000000011226b598 -[Xcode3LocalizationsInspector tableView:setObjectValue:forTableColumn:row:] (in Xcode3UI) 9 0x00007fff8f1cbd69 -[NSTableView _tryCellBasedMouseDown:atRow:column:withView:] (in AppKit) 10 0x00007fff8f1546c2 -[NSTableView mouseDown:] (in AppKit) 11 0x00007fff8f656d1d -[NSWindow _handleMouseDownEvent:isDelayedEvent:] (in AppKit) 12 0x00007fff8f657fad -[NSWindow _reallySendEvent:isDelayedEvent:] (in AppKit) 13 0x00007fff8efb0735 -[NSWindow sendEvent:] (in AppKit) 14 0x00000001018ae31e -[IDEWorkspaceWindow sendEvent:] (in IDEKit) 15 0x00007fff8eface49 -[NSApplication sendEvent:] (in AppKit) 16 0x0000000101664ae9 -[IDEApplication sendEvent:] (in IDEKit) 17 0x00007fff8eee003a -[NSApplication run] (in AppKit) 18 0x00007fff8ee62520 NSApplicationMain (in AppKit) 19 0x00007fff965c75ad start (in libdyld.dylib) abort() called Application Specific Signatures: NSInvalidArgumentException Application Specific Backtrace 1: 0 CoreFoundation 0x00007fff96b1bae2 __exceptionPreprocess + 178 1 DVTFoundation 0x0000000100452734 DVTFailureHintExceptionPreprocessor + 194 2 libobjc.A.dylib 0x00007fff8ddf973c objc_exception_throw + 48 3 CoreFoundation 0x00007fff96b1b98d +[NSException raise:format:] + 205 4 Foundation 0x00007fff8b42ce6b -[NSPathStore2 stringByAppendingPathExtension:] + 113 5 DevToolsCore 0x0000000108cec86c -[Xcode3VariantGroup proposedFilePathForLocalization:fileType:] + 470 6 Xcode3UI 0x000000011228ec8c -[Xcode3LocalizationCommands addLocalizedResourceWithDefaultLocale:variantGroup:inspectorLocale_locale:inspectorLocale_fileDataType:conversionFileDataType:fileDataType:allowsConversion:operationCompletionBlock:] + 621 7 Xcode3UI 0x0000000112269c80 -[Xcode3LocalizationsInspector addResourceForInspectorLocale:] + 681 8 Xcode3UI 0x000000011226b598 -[Xcode3LocalizationsInspector tableView:setObjectValue:forTableColumn:row:] + 1183 9 AppKit 0x00007fff8f1cbd69 -[NSTableView _tryCellBasedMouseDown:atRow:column:withView:] + 1992 10 AppKit 0x00007fff8f1546c2 -[NSTableView mouseDown:] + 4507 11 AppKit 0x00007fff8f656d1d -[NSWindow _handleMouseDownEvent:isDelayedEvent:] + 6322 12 AppKit 0x00007fff8f657fad -[NSWindow _reallySendEvent:isDelayedEvent:] + 212 13 AppKit 0x00007fff8efb0735 -[NSWindow sendEvent:] + 517 14 IDEKit 0x00000001018ae31e -[IDEWorkspaceWindow sendEvent:] + 156 15 AppKit 0x00007fff8eface49 -[NSApplication sendEvent:] + 2540 16 IDEKit 0x0000000101664ae9 -[IDEApplication sendEvent:] + 739 17 AppKit 0x00007fff8eee003a -[NSApplication run] + 796 18 AppKit 0x00007fff8ee62520 NSApplicationMain + 1176 19 libdyld.dylib 0x00007fff965c75ad start + 1
我想知道是否这可能是一个问题,项目configuration诱导因为我使用cocoapods和一些自定义生成脚本来获取一些资源在构build时。 但是,我没有看到任何可以解释这个问题的问题。
有没有办法来解决这个由我们自己,或者它是在文件系统的副本,并希望Xcode将拿起的变化?
可能的原因是:在启用Info.plist
基本本地化之后, 项目拒绝构build :
错误:无法从'/Users/[redacted]/git/[redacted]-ios/[redacted]/Info.plist'中读取数据:文件“Info.plist”无法打开,因为没有这样的文件。
这并不让我感到意外,因为xcode将文件移动到了Base.lproj
。