这个问题在这里已有答案:

我在现有的swift基础项目中添加了一组Objective C类和一个storyboard . 我还添加了桥接头文件但是当我从swift代码实例化一个目标c类时,我面临这个错误 . 我见过很多答案和问题,但没有一个能解决我的问题 .

我还根据this link检查了.m文件,并且每个都是完美的 . 我在界面下添加了@implementation .

体系结构x86_64的未定义符号:“_ OBJC_CLASS _ $ _ ContactViewController”,引用自:ContactVC.o中的objc-class-ref:ld:未找到体系结构x86_64 clang的符号:错误:链接器命令失败,退出代码为1(使用 - v看看调用)

这是我的快捷代码 .

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