core data - Check if id attribute already exists in CoreData - Swift 3.0 -
suppose saved following restaurant details id, name, address in core data , how can check wether restaurant particular id exist or not in core data data base.
- create
nsfetchrequest
appropriate entity. - assign
nspredicate
request formatid == %@, currentid
. - perform fetch.
- if returned array not empty item exists.
Comments
Post a Comment