ios - UIReferenceLibraryViewController hasDictionaryDefinition only works in Simulator on iPhone 5s -
when phone call code:
nsstring* word = @"hello"; bool response = [uireferencelibraryviewcontroller dictionaryhasdefinitionforterm:word];
...on iphone 5s or above right value 'response' (a bool depending on whether variable 'word' defined in local dictionary or not. takes 500ms execute on simulator.
however, when phone call on iphone 4s, 5, 6 or 6+ simulator (but not 5s), comes false , writes next log:
+[_uidictionarymanager _availabledefinitiondictionaries] returned nil. error: error domain=aserror code=21 "the operation couldn’t completed. (aserror error 21 - unable re-create asset information)"
the dictionary functionality should work on ios 5+. don't have iphone 4s/5/6/6+ devices test on.
what going on?
not sure if answers question here's might interested know about:
if openuireferencelibraryviewcontroller
(even outside app, e.g. safari) and tap manage there show dictionary list (even without downloading anything), error disappears current simulator. resetting content , settings on simulator gets error — until #1 again. strangely, on device yes
in dictionaryhasdefinitionforterm:
, if see "no definition found" in controller. some of these must bug :-) i'm curious know if has same behaviour in #3 smells worse littering in logs.
ios objective-c iphone
No comments:
Post a Comment