With the 32 bit simulator,
If you make an object from (NSNumber *)kCFNumberPositiveInfinity like this:
NSObject *dummy = (NSNumber *)kCFNumberPositiveInfinity;
and inspect it, you will see it is this:
dummy = (__NSCFNumber *)(double)inf
and when you convert it to an long value like this:
long longDummy = [(NSNumber *)dummy longValue];
it gets set to 0
if you just set a long to that value like this:
long testDummy = kCFNumberPositiveInfinity;
it gets set to 53994368
The problem (whether it be a bug, or just an unexpected implementation) is in the format of this call
[((NSNumber *)kCFNumberPositiveInfinity) longValue];
where you force it to an NSNumber, which defaults to a double, because it doesn't know better, and then get a longValue from a double.