I have in project array of workout programs (code for them are on Objective-C) and in every program I have @property (nullable, nonatomic, copy) NSString *scheduleStr; for program durations. This property stores values such as 1 week, 2 weeks, 3 weeks and etc. I need to filter all values bigger than 6 weeks. I'm trying to apply NSPredicate:
predicates.append(NSPredicate(format: "scheduleStr.integerValue >= 6"))
and after this I'm receiving only programs with length 6-9 weeks, but nothing more than 10 weeks, but for sure I have several programs in database with length equal 12 weeks. If I'm trying to apply something like this:
predicates.append(NSPredicate(format: "scheduleStr.integerValue >= 10"))
I will receive almost all the programs. How to get all programs with more than selected values?