我正在尝试在我用 Swift 编写的应用程序中使用 SlackTextViewController ( https://github.com/slackhq/SlackTextViewController )。
(我正在关注这个-> https://stackoverflow.com/a/26467524/2852500)
安装 pod 后,一切正常,但是当我尝试从他们的一个 Objective-C 类进行子类化时,构建失败并出现以下错误 -
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_SLKTextViewController", referenced from:
_OBJC_CLASS_$__TtC8Appname15Class2 in Class2.o
"_OBJC_METACLASS_$_SLKTextViewController", referenced from:
_OBJC_METACLASS_$__TtC8Appname15Class2 in Class2.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我遵循了架构 arm64 的未定义符号,但随后我得到了 armv7 的相同错误。
我的桥接头如下:
#ifndef Appname_Bridging_Header_h
#define Appname_Bridging_Header_h
#import <GooglePlus/GooglePlus.h>
#import <GoogleOpenSource/GoogleOpenSource.h>
#import <SLKTextViewController.h>
#import <SLKInputAccessoryView.h>
#import <SLKTextInputbar.h>
#import <SLKTextView.h>
#import <SLKTypingIndicatorView.h>
#endif