我正在使用 react-native-intercom 插件以及使用手动链接的最新对讲 ios 库。
该项目在链接阶段之前构建良好,然后引发此错误。
我已经完成了对讲机手动链接过程中描述的所有步骤,包括在构建设置中添加条框架脚本作为运行脚本阶段。
这是它抛出的错误消息。
undef: _OBJC_CLASS_$_ICMCompany
undef: _OBJC_CLASS_$_ICMUserAttributes
undef: _IntercomUnreadConversationCountDidChangeNotification
undef: _OBJC_CLASS_$_Intercom
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ICMCompany", referenced from:
objc-class-ref in libRNIntercom.a(IntercomUserAttributesBuilder.o)
"_OBJC_CLASS_$_ICMUserAttributes", referenced from:
objc-class-ref in libRNIntercom.a(IntercomUserAttributesBuilder.o)
"_IntercomUnreadConversationCountDidChangeNotification", referenced
from:
___48-[IntercomEventEmitter handleUpdateUnreadCount:]_block_invoke in libRNIntercom.a(IntercomEventEmitter.o)
-[IntercomEventEmitter constantsToExport] in libRNIntercom.a(IntercomEventEmitter.o)
-[IntercomEventEmitter supportedEvents] in libRNIntercom.a(IntercomEventEmitter.o)
-[IntercomEventEmitter startObserving] in libRNIntercom.a(IntercomEventEmitter.o)
"_OBJC_CLASS_$_Intercom", referenced from:
objc-class-ref in AppDelegate.o
(maybe you meant: _OBJC_CLASS_$_IntercomUserAttributesBuilder,
_OBJC_CLASS_$_IntercomWrapper , _OBJC_CLASS_$_IntercomEventEmitter )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
我认为它与项目支持的框架架构有关,但我是 iOS 构建的新手,不知道如何解决这个问题。