1

Im trying to import contacts framework to my xcode7 , I have added the contacts framework from the build phases and I have declared

import UIKit
import Contacts

but it shows error saying /Users/anonymous/Desktop/Contacts/Contacts/ViewController.swift:10:8: Cannot import module being compiled

sriram hegde
  • 2,301
  • 5
  • 29
  • 43

2 Answers2

5

Yes try giving some different project name say"MyContactsDemo". it should work.

Note:posted in answer block as suggested by the person who questioned.

Prabhu.Somasundaram
  • 1,380
  • 10
  • 13
1

If your framework being embedded or linked against has the same name as your product/target... you will run into this issue with swift 2 & xcode 7 it seems. There are fixes mentioned above, but I'm adding this just to spell the problem out.

Aku
  • 844
  • 9
  • 16