.a文件包含的文件库不包含.o文件
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GLKView", referenced from:
objc-class-ref in librtc_sdk_objc.a(RTCEAGLVideoView.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
.a文件包含的.o可能不支持arm64,如果是不需要的文件可以使用ar命令去掉.o文件,RTCEAGLVideoView.o是一个视图,我只需要回声消除模块,因此我将它剔除。
问题根源:
.a静态库导入是正常的,没问题。出现问题是因为这个文件可能确实无法编译arm64(因为iOS12之后苹果编译器不再支持armv7)。
本次的解决思路:
- 使用lipo 分别将.a拆分
支持armv7lipo xxxxx.a -thin armv7 -output xxx_new7.a
支持arm64lipo xxxxx.a -thin arm64 -output xxx_new64.a
- 使用ar命令删除其中一个.a的冲突的.o
ar -d xxx_new7.a RTCEAGLVideoView.o
ar -d xxx_new64.a RTCEAGLVideoView.o
- 使用lipo 合并
lipo -create xxx_new7.a xxx_new64.a -output xxxxx_new.a
iOS暗黑模式导致出现来不及修复的黑色bug
只要在plist文件设置 "User Interface Style" 为 "Light" 即可恢复成白色模式