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 format id == %@, currentid.
  • perform fetch.
  • if returned array not empty item exists.

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -