我需要幫助瞭解下面的錯誤。RestKit不會在64位模擬器中映射BOOL
我定義爲我的NSObject的一個BOOL:
@property (nonatomic) BOOL isOpen;
在我RESKIT類別I:
[mapping addAttributeMappingsFromDictionary:@{......
@"isOpen": @"isOpen"
......}];
得很完美了幾個星期的使用我的iPhone4S和原始了所有的考試iphone 5。作爲最後的測試,我測試了64位設備的模擬器,並且我收到以下錯誤:
restkit.object_mapping:RKMappingOperation.m:440 Failed transformation of value at keyPath 'isOpen' to representation of type '__NSCFBoolean': Error Domain=org.restkit.RKValueTransformers.ErrorDomain Code=3002 "Failed transformation of value '1' to __NSCFBoolean: none of the 2 value transformers consulted were successful." UserInfo=0x10cba1c00 {NSLocalizedDescription=Failed transformation of value '1' to __NSCFBoolean: none of the 2 value transformers consulted were successful., detailedErrors=(
"Error Domain=org.restkit.RKValueTransformers.ErrorDomain Code=3002 \"The given value is not already an instance of '__NSCFBoolean'\" UserInfo=0x10cb86d30 {NSLocalizedDescription=The given value is not already an instance of '__NSCFBoolean'}",
"Error Domain=org.restkit.RKValueTransformers.ErrorDomain Code=3000 \"Expected an `inputValue` of type `NSNull`, but got a `__NSCFNumber`.\" UserInfo=0x10cbeb400 {NSLocalizedDescription=Expected an `inputValue` of type `NSNull`, but got a `__NSCFNumber`.}"
)}
的iPhone 5S,iPad的空氣和視網膜iPad的迷你是唯一64目前的iOS設備。 – Gavin
所以想必我的應用程序不能正常使用它們?使用restKit正確創建BOOL映射的方法是什麼? – Mika
嘗試使用'NSNumber'而不是'BOOL',會發生什麼? – Wain