РЕДАКТИРОВАТЬ: префикс вопроса с «Метод Swizzle Crash», чтобы помочь другим найти ошибку.
Для каждой клавиши, нажатой на вьетнамской клавиатуре на симуляторе или любом устройстве под управлением iOS 4 или выше, следующее сообщениевыводит на консоль, и первый респондент не отправляет ни одного символа:
Can't find transliterator file: vi_TelexTransliterator
utrans_transUChars error U_ILLEGAL_ARGUMENT_ERROR
Нет экземпляров этих строк или подстрок в моем коде сервера или клиента.Это происходит из API.
Симуляторы и устройства под управлением iOS 4 будут последовательно вылетать при втором нажатии клавиши.В iOS 5 не происходит сбоев. Ошибка в верхней части стека вызовов выглядит следующим образом:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFString substringToIndex:]: Range or index out of bounds'
Стеки вызовов выглядят так:
Foundation -[NSString substringToIndex:]
TextInput -[TIKeyboardInputManagerZephyr internalIndexToExternal:]
TextInput -[TIKeyboardInputManagerZephyr inputCount]
UIKit -[UIKeyboardImpl addInputString:fromVariantKey:]
UIKit -[UIKeyboardImpl handleStringInput:fromVariantKey:]
UIKit -[UIKeyboardImpl handleKeyEvent:]
UIKit -[UIApplication _handleKeyEvent:]
UIKit -[UIResponder(Internal) _handleKeyEvent:]
UIKit -[UIResponder(Internal) _handleKeyEvent:]
UIKit -[UIResponder(Internal) _handleKeyEvent:]
UIKit -[UIResponder(Internal) _handleKeyEvent:]
UIKit -[UIResponder(Internal) _handleKeyEvent:]
UIKit -[UIResponder(Internal) _handleKeyEvent:]
UIKit -[UIResponder(Internal) _handleKeyEvent:]
UIKit -[UIResponder(Internal) _handleKeyEvent:]
UIKit -[UIResponder(Internal) _handleKeyEvent:]
UIKit -[UIResponder(Internal) _handleKeyEvent:]
UIKit -[UIApplication handleKeyEvent:]
UIKit -[UIKeyboardLayoutStar sendStringAction:forKey:]
UIKit -[UIKeyboardLayoutStar touchUp:]
UIKit -[UIKeyboardLayout touchesEnded:withEvent:]
UIKit -[UIWindow _sendTouchesForEvent:]
UIKit -[UIWindow sendEvent:]
UIKit -[UIApplication sendEvent:]
UIKit _UIApplicationHandleEvent
GraphicsServices PurpleEventCallback
CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
CoreFoundation __CFRunLoopDoSource1
CoreFoundation __CFRunLoopRun
CoreFoundation CFRunLoopRunSpecific
CoreFoundation CFRunLoopRunInMode
GraphicsServices GSEventRunModal
GraphicsServices GSEventRun
UIKit -[UIApplication _run]
UIKit UIApplicationMain
APP main (main.m:XXX)
Я пробовалэта клавиатура в разных местах по всему приложению, в том числе на экране безопасности перед загрузкой основного представления и со всеми нашими методами обработки ввода, закомментированными в его делегате.Отказ последовательный.Когда методы делегата реализованы, и я перехожу через textField: shouldChangeCharactersInRange: replaceString:, полученная строка действительна.
Кажется, все указывает на то, что это проблема Apple, но я не нахожу других отчетов овыпуск онлайн.Моя интуиция говорит, что это что-то в моем коде.Кто-нибудь может намекнуть?