아래 오류를 이해하는 데 도움이 필요합니다. 내가 사용하는 내 RESKIT 클래스에서RestKit은 64 비트 시뮬레이터에서 BOOL을 매핑하지 않습니다.
@property (nonatomic) BOOL isOpen;
:
[mapping addAttributeMappingsFromDictionary:@{......
@"isOpen": @"isOpen"
......}];
내 모든 테스트를 내 아이폰 4S와 원본을 사용하는 주 동안 완벽하게 작동했습니다
나는 정의 내 NSObject의에서 BOOL이 아이폰 5. 마지막 테스트로 나는 64 비트 장치 시뮬레이터에서 테스트 나는 다음과 같은 오류 얻을 : true와 false 대신 1과 0을 사용하여 내 JSON으로
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`.}"
)}
아이폰 5S, 아이 패드 에어와 레티 나 아이 패드 미니는 64입니다 지금까지 iOS 기기에 맞춰 보았습니다. – Gavin
아마도 내 앱이 제대로 작동하지 않겠습니까? restkit으로 BOOL 맵을 올바르게 만드는 방법은 무엇입니까? – Mika
'BOOL' 대신'NSNumber'를 사용해보십시오. 어떻게됩니까? – Wain