Nativescript-plugin-firebase: Directory not found, Build Failed when including MLKIT && Text Recognition

Created on 30 Oct 2018  路  8Comments  路  Source: EddyVerbruggen/nativescript-plugin-firebase

Package.json:
{ "nativescript": { "id": "org.nativescript.businesscardscanner", "tns-android": { "version": "4.2.0" }, "tns-ios": { "version": "4.3.0-2018-09-19-01" } }, "description": "NativeScript Application", "license": "SEE LICENSE IN <your-license-filename>", "repository": "<fill-your-repository-here>", "dependencies": { "@angular/animations": "~6.1.0", "@angular/common": "~6.1.0", "@angular/compiler": "~6.1.0", "@angular/core": "~6.1.0", "@angular/forms": "~6.1.0", "@angular/http": "~6.1.0", "@angular/platform-browser": "~6.1.0", "@angular/platform-browser-dynamic": "~6.1.0", "@angular/router": "~6.1.0", "nativescript-angular": "~6.1.0", "nativescript-plugin-firebase": "^7.3.0", "nativescript-theme-core": "~1.0.4", "reflect-metadata": "~0.1.8", "rxjs": "~6.2.0", "tns-core-modules": "~4.2.1", "zone.js": "^0.8.26" }, "devDependencies": { "typescript": "~2.7.2", "nativescript-dev-typescript": "~0.7.0", "@nativescript/schematics": "~0.3.0" }, "readme": "NativeScript Application" }

firebase.nativescript.json:

{ "external_push_client_only": false, "using_ios": true, "using_android": false, "firestore": false, "realtimedb": false, "authentication": false, "remote_config": false, "performance_monitoring": false, "messaging": false, "crashlytics": false, "crash_reporting": false, "storage": false, "functions": false, "facebook_auth": false, "google_auth": false, "admob": false, "invites": false, "dynamic_links": true, "ml_kit": true, "ml_kit_text_recognition": true, "ml_kit_barcode_scanning": false, "ml_kit_face_detection": false, "ml_kit_image_labeling": false, "ml_kit_custom_model": false }

Error Message:
ld: warning: directory not found for option '-F/Users/jon/Library/Developer/Xcode/DerivedData/businesscardscanner-auiudsyhgxwaxfemneeqijnxhqcf/Build/Products/Debug-iphonesimulator/Protobuf' ld: warning: directory not found for option '-F/Users/jon/Library/Developer/Xcode/DerivedData/businesscardscanner-auiudsyhgxwaxfemneeqijnxhqcf/Build/Products/Debug-iphonesimulator/nanopb' Undefined symbols for architecture i386: "_fEqual", referenced from: -[FIRVisionPoint isEqual:] in FirebaseMLVision(FIRVisionPoint_4f04bc57476c98935c2a2df41948a031.o) "_OBJC_CLASS_$_FBMLx_GMVFaceInitializationOptions", referenced from: objc-class-ref in FirebaseMLVision(FIRVisionFaceDetectorOptions_aad8020cef277ef84e95fb1088aff2ba.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) ** BUILD FAILED **

-- This issue does not let me build when MLKit is set to true. I am able to build just fine if I build with authentication for instance. This appears to only be related to MLKit. The project that I have been working on can be found here... https://github.com/jonathanRinciari/business-card-scanner.

-- I tried pulling down the demo and also ran into a similar issue..? Not sure what could be causing this issue when specifically targeting MLKIt

-- This issue or similar issues .. #990, #972, #472

ML Kit bug iOS

Most helpful comment

About to release 7.4.0 which includes the latest Firebase iOS SDK and I'm quite positive the issue is fixed (it is for me).

All 8 comments

I actually have the same issue when using MLKit on iOS. Looks like this bit of the Firebase SDK was recently updated and causes an issue. Not sure how to fix it though!

I'm planning to bump the Firebase SDK to the latest version, but that one has an issue as well (not related to this one). It looks like that issue is solved in their master branch already so I'm waiting for a new release, after which we can update as well.

Alright I appreciate the quick response I am glad that it wasnt just a bad cache or config issue!

just wondering has this problem been fixed yet? i'm still being affected by this

I would have reported back here.

Keep an eye out for Firebase iOS SDK updates. They need to release an update first, then we can fix the plugin.

I have a similar problem with the barcode scanner. My project is in the critical stage :(

Temporary solution from my side:

  1. in platforms/ios/Podfile remove versions from 'Firebase/Core' and 'GoogleUtilities'
    I ended up with this:
 # End Podfile
# Begin Podfile - /Users/pawel.dziura/Projects/DHL_POC/node_modules/nativescript-plugin-firebase/platforms/ios/Podfile
 pod 'Firebase/Core'
# Temporary fix, see https://github.com/EddyVerbruggen/nativescript-plugin-firebase/pull/926
pod 'GoogleUtilities'

That will install latest firebase 5.11.0 && GoogleUtilities 5.3.4

  1. in platforms/ios use pod install (no pod repo update)
  2. in platforms/ios/plugins-debug.xcconfig and platforms/ios/plugins/plugins-release.xcconfig in line 10 (OTHER_LDFLAGS) add -framework "QuartzCore" in the end
  3. bump the minimal version of iOS to at least 9 (i used 10). I just opened the project in XCode and changed it
  4. tns run ios

App has been successfully built and run on real device. Barcode scanner works.

About to release 7.4.0 which includes the latest Firebase iOS SDK and I'm quite positive the issue is fixed (it is for me).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tsili852 picture tsili852  路  3Comments

SBD580 picture SBD580  路  3Comments

romandragan picture romandragan  路  3Comments

Aceman18 picture Aceman18  路  3Comments

EddyVerbruggen picture EddyVerbruggen  路  3Comments