Aldo Lazuardi
Aldo Lazuardi

Reputation: 1948

Use of unresolved identifier CNContact [swift 3]

In swift 2, this below line works

var contacts = [CNContact]()

But in swift 3 it's got 'Use of unresolved identifier CNContact' error message. I tried both insert and delete import Contacts since xcode 8 ignoring import because the viewcontroller is already part of module 'Contacts'. How to solve it?

Upvotes: 0

Views: 2593

Answers (1)

Sohel L.
Sohel L.

Reputation: 9540

It's perfectly working in Swift 3.0. I have just created a new project and I can freely use CNContact.

enter image description here

Possible Workaround:

  1. Delete Derived Data
  2. Clean your project

Now try to build your project.

Upvotes: 4

Related Questions