Wednesday, 15 September 2010

ios - NSPredicate error in ios6 -



ios - NSPredicate error in ios6 -

i'm experiencing error nspredicates in ios 6.1 (simulator)

i have next predicate:

nspredicate *eventswithinperiodepredicate = [nspredicate predicatewithformat:@"(startdate >= %@) , (enddate <= %@)", startdate, enddate];

if have array 2 objects next dates:

startdate = "2014-06-23t12:00:00.00000+0200"; enddate = "9999-12-31t23:59:59.00999+0100"; startdate = "2014-06-17t09:00:00.00000+0200"; enddate = "2014-06-17t11:00:00.00000+0200";

in ios 7 (simulator , device) , ios 5 (device) sec event if send 2014-06-17t00:00:00.00000 , 2014-06-17t23:59:00.00000

in ios 6.1 running in simulator both events.

i don't have ios6 specific code involved here. bug? don't have ios 6 device unable sure whether impact devices.

seems ran this problem dateformatter.

i made workaround ios 6. haven't tested if bug in ios 6 versions, took of them account.

if(system_version_greater_than_or_equal_to(@"6.0") && system_version_less_than(@"7.0")) { if([todatetimestring hasprefix:@"9999"]) { enddate = [nsdate distantfuture]; } }

ios objective-c nspredicate ios6.1

No comments:

Post a Comment