在没有 cocoapods 的 iOS 上使用 Firebase ML Kit 时 Google Mobile Vision 中的链接器错误

Linker errors in GoogleMobileVision when using Firebase ML Kit on iOS without cocapods

我正在尝试将 Firebase 5.0.1 的 MLVisionTextModel 添加到没有 cocoapods 的 Xcode 项目中。我已经添加了 Readme.md 文件中所述的所有依赖框架。收到以下链接器错误:

Showing All Messages "_OBJC_CLASS_$_LAContext", referenced from: objc-class-ref in GoogleMobileVision(MDMPasscodeCache_f189776e75765630b82721fafea64052.o) "_vImageConverter_CreateWithCGImageFormat", referenced from: +[GMVUtility(Internal) sampleBuffer32BGRATo32RGBA:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o) "_vImageConvert_AnyToAny", referenced from: +[GMVUtility(Internal) sampleBuffer32BGRATo32RGBA:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o) "_vImageConverter_Release", referenced from: +[GMVUtility(Internal) sampleBuffer32BGRATo32RGBA:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o) "_vImageBuffer_InitWithCGImage", referenced from: +[GMVUtility(Internal) rgbaPixelDataFromCGImage:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o) "_vImageRotate_ARGB8888", referenced from: +[GMVUtility(Internal) rotatePixelData:width:height:bytesPerRow:withAngle:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o) "_vImageHorizontalReflect_ARGB8888", referenced from: +[GMVUtility(Internal) flipRGBA8888Horizontally:width:height:bytesPerRow:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o) "_vImagePermuteChannels_ARGB8888", referenced from: +[GMVUtility(Internal) permutate:width:height:bytesPerRow:order:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o) "_vImageFlatten_RGBA8888ToRGB888", referenced from: +[GMVUtility(Internal) flattenRGBA8888ToRGB888:width:height:bytesPerRow:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o) ld: symbol(s) not found for architecture x86_64

感谢任何帮助。

Firebase 框架是静态构建的,因此如果您手动将它们添加到您的项目中,它们不应位于嵌入式二进制文件下xcode 在你的应用目标下。如果你有它,删除它应该可以解决问题。

在 Xcode 中添加 Accelerate.framework 作为构建阶段的一部分后问题得到解决。