no message

This commit is contained in:
giuseppenuc committed 2016-05-03 17:57:01 +02:00
1 parent 5a768fcda5
commit 6134edbd12
5 files changed
+13 -9

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@
@"street":@"street",
@"number":@"number",
@"zip":@"zip",
@"location":@{@"key":@"location",@"type":@"PNLocation"},
@"location":@{PNObjectMappingKey:@"location",PNObjectMappingType:@"PNLocation"},
};
return mapping;
}
+1 -1
View File
@@ -32,7 +32,7 @@ static bool isFirstAccess = YES;
+ (NSDictionary *)objcetMapping {
NSDictionary *mapping = @{@"user":@{@"key":@"user",@"type":[[[PNObjectConfig sharedInstance] userSubClass] PNObjClassName]},
NSDictionary *mapping = @{@"user":@{PNObjectMappingKey:@"user",PNObjectMappingType:[[[PNObjectConfig sharedInstance] userSubClass] PNObjClassName]},
@"deviceType":@"deviceType",
@"deviceModel":@"deviceModel",
@"deviceName":@"deviceName",
+1 -1
View File
@@ -409,7 +409,7 @@ static bool isFirstAccess = YES;
@"sex":@"sex",
@"birthDate":@"birthDate",
@"phone":@"phone",
@"password":@{@"key":@"password",@"type":[PNObjcPassword PNObjClassName]},
@"password":@{PNObjectMappingKey:@"password",PNObjectMappingType:[PNObjcPassword PNObjClassName]},
@"hasAcceptedPrivacy":@"hasAcceptedPrivacy",
@"hasAcceptedNewsletter":@"hasAcceptedNewsletter",
@"hasVerifiedEmail":@"hasVerifiedEmail",
+2 -2
View File
@@ -190,8 +190,8 @@
id mappingValue = [self.JSONObjectMap valueForKey:propertyName];
if([mappingValue isKindOfClass:NSDictionary.class]) {
mappedJSONKey = [mappingValue valueForKey:@"key"];
mappedJSONType = [mappingValue valueForKey:@"type"];
mappedJSONKey = [mappingValue valueForKey:PNObjectMappingKey];
mappedJSONType = [mappingValue valueForKey:PNObjectMappingType];
} else {
mappedJSONKey = mappingValue;
}
+8 -4
View File
@@ -206,6 +206,7 @@ NSString * const PNObjectMappingSelector = @"selector";
NSString *mappedJSONKey;
NSString *mappedJSONType;
NSString *type;
if (self.JSON && [[self.JSON allKeys] count] == 0) {
self.JSON = [[NSMutableDictionary alloc] initWithDictionary:[self reverseMapping]];
@@ -217,14 +218,17 @@ NSString * const PNObjectMappingSelector = @"selector";
id mappingValue = [self.JSONObjectMap objectForKey:propertyName];
if([mappingValue isKindOfClass:NSDictionary.class]) {
mappedJSONKey = [mappingValue valueForKey:@"key"];
mappedJSONType = [mappingValue valueForKey:@"type"];
mappedJSONKey = [mappingValue valueForKey:PNObjectMappingKey];
mappedJSONType = [mappingValue valueForKey:PNObjectMappingType];
} else {
mappedJSONKey = mappingValue;
mappedJSONType = [properties valueForKey:propertyName];
}
NSLog(@"PropertyName PropertyType: %@ - %@",propertyName,mappedJSONType);
type = [properties valueForKey:propertyName];
NSLog(@"PropertyName MappedJsonType PropertyType: %@ - %@ - %@",propertyName,mappedJSONType,type);
id value;
@@ -321,7 +325,7 @@ NSString * const PNObjectMappingSelector = @"selector";
[JSON setValue:arr forKey:propertyName];
}
}[mappedJSONType] ?: ^{
}[type] ?: ^{
BOOL isPNObjectSubclass = [NSClassFromString(mappedJSONType) isSubclassOfClass:[PNObject class]];
if(isPNObjectSubclass) {