4
當我創建一個空屬性restkit對象,應用程序崩潰說:境界默認值屬性崩潰
財產「secondHeader」沒有指定值或默認值在 「FZPublication」
但該方法defaultPropertyValues有屬性的默認值
+(NSDictionary *)defaultPropertyValues {
return @{
@"serviceId" : @0,
@"filterId" : @0,
@"proccessDate" : @"",
@"relation" : @"",
@"header" : @"",
@"text" : @"",
@"remoteId" : @0,
@"versionId" : @0,
@"footer" : @"",
@"secondHeader" : @"",
@"companyRemoteId" : @0,
};
}
我restkit映射:
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[FZPublication class]];
[mapping addAttributeMappingsFromDictionary:@{
@"IdServico":@"serviceId",
@"IdFiltro":@"filterId",
@"Lido":@"read",
@"DtProcessamento":@"proccessDate",
@"Relacao":@"relation",
@"Cabecalho1":@"header",
@"Cabecalho2":@"secondHeader",
@"Texto":@"text",
@"Id":@"remoteId",
@"IdEmpresa":@"companyRemoteId",
@"IdVersao":@"versionId",
@"DtPublicacao":@"publicationDateString",
@"NomeDiario" : @"diaryName",
@"DtDisponibilizacao" : @"availableDateString",
@"NDiario" : @"diaryNumber",
@"NProcesso" : @"proccessNumber",
@"NPagina" : @"pageNumber",
@"Rodape" : @"footer"
}];
有人有一個想法什麼是happing?
設置異常斷點,使其在崩潰時停止。發佈代碼,以便我們可以看到它在做什麼 – Chris
您可以請分享您的RestKit映射代碼嗎? – segiddins
@Chris異常斷點在域代碼中停止,我只是保存在restkit回調中 –