Skip to content

SiarheiFedartsou/SFPPredicateDSL

Repository files navigation

SFPPredicateDSL

CI Status Version License Platform

Allows to work with NSPredicate's in much safer manner with compile-time checks. For example instead of this:

[NSPredicate predicateWithFormat:@"keypath == %@ AND keypath2 IN %@", @10, @[@1, @2, @3]]

you can just write:

[NSPredicate predicate:where(@"keypath").equals(@10).and.where(@"keypath2").in(@[@1, @2, @3])]

For more examples of usage see specs.

Installation

SFPPredicateDSL is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SFPPredicateDSL"

Author

Siarhei Fiedartsou, siarhei.fedartsou@gmail.com

License

SFPPredicateDSL is available under the MIT license. See the LICENSE file for more info.