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
nsfetchrequestappropriate entity. - assign
nspredicaterequest formatid == %@, currentid. - perform fetch.
- if returned array not empty item exists.
Comments
Post a Comment