1

I am trying to add the MLVisionTextModel of Firebase 5.0.1 into an Xcode project without cocoapods. I have added all the dependent frameworks as stated in the Readme.md file. Getting the following linker errors:

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

Any help is appreciated.

avdhut
  • 128
  • 1
  • 13

2 Answers2

4

The issue got resolved after adding Accelerate.framework as part of the build phases in Xcode.

avdhut
  • 128
  • 1
  • 13
2

Firebase frameworks are built statically, so if you are adding them manually to your project they should not be under embedded binaries in xcode under your application target. If you have it there removing it should fix the issue.

jugutier
  • 179
  • 1
  • 13
  • Have added all of them under `Linked Frameworks and Libraries`. Don't have any entries under `Embedded Binaries`. – avdhut May 22 '18 at 05:01
  • Did you add all off the frameworks necessary for GoogleMobileVision? They will be under the same folder if you downloaded from here https://firebase.google.com/docs/ios/setup#frameworks – jugutier May 22 '18 at 10:25
  • Are they also added in the framework search path and header search paths? Can you share a github repo with your current project setting? Also I can see that you’re trying to compile for the simulator, do you get the same result if running on the phone? Finally the methods you’re trying to access belong to a GMVUtility category called internal, which makes me think those header are meant to be hidden. If you browse the framework in the filesystem – jugutier May 22 '18 at 10:28
  • Can you find GMVUtility+Internal.h? – jugutier May 22 '18 at 10:29
  • I have added all the required frameworks from Firebase for FirebaseMLVisionTextModel along with LocalAuthentication & StoreKit system frameworks. The Framework path is also added in both Framework & Header search paths. When I check the GoogleMobileVision.framework in the file system, I am able to only find GMVUtility.h and not GMVUtility+Internal.h – avdhut May 23 '18 at 06:14
  • So it seems like GoogleMobileVision is missing one of its dependencies, please check from the link I sent you above that you have all the frameworks in the folder for vision. If possible remove what you have and add back from there. I have got this working last week so otherwise you can share a GitHub project and I’ll take a look. – jugutier May 23 '18 at 11:57
  • I have added all the dependencies from the link that you have shared. I am using Firebase SDK v5.1.0. I have uploaded my Xcode project at the following WeTransfer link: https://wetransfer.com/downloads/18b56cfab3968065fe8d46379f50498320180524105033/1db7e4 – avdhut May 24 '18 at 11:01
  • Is it possible for you to share the GMVUtility+Internal.h file in case you have it? – avdhut May 29 '18 at 05:03
  • I don't have it. Probably part of google private headers and that's why they aren't sharing it. I downloaded the project you shared but it doesn't compile, missing 'rhodes' files. However I can see in the framework search path you have $(PROJECT_DIR)/Frameworks , can you set that to recursive and see if it fixes the issue? – jugutier May 29 '18 at 14:07
  • 1
    Hey, thanks for all the help! The issue was resolved after adding Accelerate framework. – avdhut May 30 '18 at 08:52