1

I have added a group of Objective C classes and one storyboard in the existing swift base project. I also added bridging header file but when I instantiate one of the objective c class from the swift code I am facing this error. I have seen many answers and questions but none of them could solve my problem.

i also checked .m file according to this link and everyrhing is perfact there. I added @implementation under the interface.

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_ContactViewController", referenced from: objc-class-ref in ContactVC.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

here is my swift code.

  let storyBoard = UIStoryboard(name: "Contacts", bundle: nil)
   let contactsViewController = storyBoard.instantiateViewController(withIdentifier: "ContactViewController") as? ContactViewController
    navigationController?.pushViewController(contactsViewController!,
                                             animated: true)

0 Answers0