diff --git a/src/ios/PushPlugin.m b/src/ios/PushPlugin.m index 1ae5dcd7..9c29d569 100644 --- a/src/ios/PushPlugin.m +++ b/src/ios/PushPlugin.m @@ -193,13 +193,16 @@ -(void)parseDictionary:(NSDictionary *)inDictionary intoJSON:(NSMutableString *) if ([thisObject isKindOfClass:[NSDictionary class]]) [self parseDictionary:thisObject intoJSON:jsonString]; - else - [jsonString appendFormat:@"\"%@\":\"%@\",", - key, - [[[[inDictionary objectForKey:key] - stringByReplacingOccurrencesOfString:@"\\" withString:@"\\\\"] - stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""] - stringByReplacingOccurrencesOfString:@"\n" withString:@"\\n"]]; + else if ([thisObject isKindOfClass:[NSString class]]) + [jsonString appendFormat:@"\"%@\":\"%@\",", + key, + [[[[inDictionary objectForKey:key] + stringByReplacingOccurrencesOfString:@"\\" withString:@"\\\\"] + stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""] + stringByReplacingOccurrencesOfString:@"\n" withString:@"\\n"]]; + else { + [jsonString appendFormat:@"\"%@\":\"%@\",", key, [inDictionary objectForKey:key]]; + } } }