Permalink
Browse files

Emergancy Objective-C Fix removing Arry limit count.

  • Loading branch information...
1 parent 6917be3 commit 9e0fe159df382b7c6885a9f26fe8c792a75e7274 @stephenlb stephenlb committed Nov 4, 2012
View
6 objective-c/3.1/Pubnub/PubNub/CEPubnub.m
@@ -456,7 +456,7 @@ - (void) getTime1 {
if ([data length] >0 && error == nil)
{
NSArray* resp= (NSArray *)JSONParseData(data);
- if ([resp isKindOfClass:[NSArray class]] && ([resp count] == 1)) {
+ if ([resp isKindOfClass:[NSArray class]]) {
time_token = [resp objectAtIndex:0];
}
}
@@ -649,7 +649,7 @@ - (void) connection:(PubNubConnection*)connection didCompleteWithResponse:(id)re
}
}
- if ([response isKindOfClass:[NSArray class]] && ([response count] == 2)) {
+ if ([response isKindOfClass:[NSArray class]]) {
NSLog(@"Received %i messages from PubNub channel \"%@\"", [[response objectAtIndex:0] count], connection.channel);
for (id message in [response objectAtIndex:0]) {
if ([message isKindOfClass:[NSDictionary class]]) {
@@ -719,7 +719,7 @@ - (void) connection:(PubNubConnection*)connection didCompleteWithResponse:(id)re
}
case kCommand_GetTime: {
NSDecimalNumber* number = nil;
- if ([response isKindOfClass:[NSArray class]] && ([response count] == 1)) {
+ if ([response isKindOfClass:[NSArray class]]) {
NSLog(@"Retrieved PubNub time '%@'", [response objectAtIndex:0]);
number = [response objectAtIndex:0];
} else if (response) {
View
6 objective-c/3.2/Pubnub/PubNub/CEPubnub.m
@@ -513,7 +513,7 @@ - (void) getTime1 {
if ([data length] >0 && error == nil)
{
NSArray* resp= (NSArray *)JSONParseData(data);
- if ([resp isKindOfClass:[NSArray class]] && ([resp count] == 1)) {
+ if ([resp isKindOfClass:[NSArray class]]) {
time_token = [resp objectAtIndex:0];
}
}
@@ -683,7 +683,7 @@ - (void) connection:(PubNubConnection*)connection didCompleteWithResponse:(id)re
}
}
- if ([response isKindOfClass:[NSArray class]] && ([response count] == 2)) {
+ if ([response isKindOfClass:[NSArray class]]) {
if(!isPresence)
NSLog(@"Received %i messages from PubNub channel \"%@\"", [[response objectAtIndex:0] count], connection.channel);
@@ -778,7 +778,7 @@ - (void) connection:(PubNubConnection*)connection didCompleteWithResponse:(id)re
}
case kCommand_GetTime: {
NSDecimalNumber* number = nil;
- if ([response isKindOfClass:[NSArray class]] && ([response count] == 1)) {
+ if ([response isKindOfClass:[NSArray class]]) {
NSLog(@"Retrieved PubNub time '%@'", [response objectAtIndex:0]);
number = [response objectAtIndex:0];
} else if (response) {
View
4 objective-c/3.3/Pubnub/PubNub/CEPubnub.m
@@ -795,7 +795,7 @@ - (void)handleCommandReceiveMessageForConnection:(PubNubConnection *)connection
}
}
- if ([response isKindOfClass:[NSArray class]] && ([response count] == 2)) {
+ if ([response isKindOfClass:[NSArray class]]) {
if(!isPresence)
NSLog(@"Received %i messages from PubNub channel \"%@\"", [[response objectAtIndex:0] count], connection.channel);
@@ -936,7 +936,7 @@ - (void)handleCommandFetchHistoryForConnection:(PubNubConnection *)connection re
- (void)handleCommandGetTimeForConnection:(PubNubConnection *)connection response:(id)response
{
NSDecimalNumber *number = nil;
- if ([response isKindOfClass:[NSArray class]] && ([response count] == 1)) {
+ if ([response isKindOfClass:[NSArray class]]) {
NSLog(@"Retrieved PubNub time '%@'", [response objectAtIndex:0]);
number = [response objectAtIndex:0];
} else if (response) {
View
4 objective-c/3.3/PubnubTest/PubnubTest/PubNub/CEPubnub.m
@@ -774,7 +774,7 @@ - (void)handleCommandReceiveMessageForConnection:(PubNubConnection *)connection
}
}
- if ([response isKindOfClass:[NSArray class]] && ([response count] == 2)) {
+ if ([response isKindOfClass:[NSArray class]]) {
if(!isPresence)
NSLog(@"Received %i messages from PubNub channel \"%@\"", [[response objectAtIndex:0] count], connection.channel);
@@ -915,7 +915,7 @@ - (void)handleCommandFetchHistoryForConnection:(PubNubConnection *)connection re
- (void)handleCommandGetTimeForConnection:(PubNubConnection *)connection response:(id)response
{
NSDecimalNumber *number = nil;
- if ([response isKindOfClass:[NSArray class]] && ([response count] == 1)) {
+ if ([response isKindOfClass:[NSArray class]]) {
NSLog(@"Retrieved PubNub time '%@'", [response objectAtIndex:0]);
number = [response objectAtIndex:0];
} else if (response) {

0 comments on commit 9e0fe15

Please sign in to comment.