React-native-background-geolocation: linker failed after linking both react-native-background-geolocation and react-native-background-fetch

Created on 11 Apr 2018  路  12Comments  路  Source: transistorsoft/react-native-background-geolocation

Your Environment

  • Plugin version: ^2.12.0-beta.3
  • Platform: iOS
  • OS version:11.3
  • Device manufacturer / model:
  • React Native version (0.55.2):
  • Plugin config

Expected Behavior

the app should build and run normaly

Actual Behavior

It failed with error

This happened after I added the frameworks reference in the libraries, before that I was getting this error

Steps to Reproduce

  1. npm install
  2. linking both libraries manually or even by using react-native-link

Debug logs

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_DDASLLogger", referenced from: objc-class-ref in TSLocationManager(TSLog.o) "_OBJC_CLASS_$_DDAbstractDatabaseLogger", referenced from: _OBJC_CLASS_$_TSDBLogger in TSLocationManager(TSDBLogger.o) "_OBJC_CLASS_$_DDLog", referenced from: objc-class-ref in TSLocationManager(TSCurrentPositionRequest.o) objc-class-ref in TSLocationManager(DatabaseQueue.o) objc-class-ref in TSLocationManager(TSConfig.o) objc-class-ref in TSLocationManager(LocationAuthorization.o) objc-class-ref in TSLocationManager(GeofenceDAO.o) objc-class-ref in TSLocationManager(TSHttpService.o) objc-class-ref in TSLocationManager(TSGeofenceManager.o) ... "_OBJC_CLASS_$_DDTTYLogger", referenced from: objc-class-ref in TSLocationManager(TSLog.o) "_OBJC_IVAR_$_DDAbstractDatabaseLogger._maxAge", referenced from: -[TSDBLogger getLog] in TSLocationManager(TSDBLogger.o) -[TSDBLogger db_delete] in TSLocationManager(TSDBLogger.o) "_OBJC_IVAR_$_DDAbstractDatabaseLogger._saveThreshold", referenced from: -[TSDBLogger initWithLogDirectory:] in TSLocationManager(TSDBLogger.o) "_OBJC_IVAR_$_DDAbstractLogger._logFormatter", referenced from: -[TSDBLogger db_log:] in TSLocationManager(TSDBLogger.o) "_OBJC_IVAR_$_DDLogMessage._context", referenced from: -[TSDBLogEntry initWithLogMessage:] in TSLocationManager(TSDBLogger.o) "_OBJC_IVAR_$_DDLogMessage._flag", referenced from: -[TSLogFormatter formatLogMessage:] in TSLocationManager(TSLogFormatter.o) -[TSDBLogEntry initWithLogMessage:] in TSLocationManager(TSDBLogger.o) "_OBJC_IVAR_$_DDLogMessage._function", referenced from: -[TSLogFormatter formatLogMessage:] in TSLocationManager(TSLogFormatter.o) "_OBJC_IVAR_$_DDLogMessage._message", referenced from: -[TSLogFormatter formatLogMessage:] in TSLocationManager(TSLogFormatter.o) -[TSDBLogEntry initWithLogMessage:] in TSLocationManager(TSDBLogger.o) "_OBJC_IVAR_$_DDLogMessage._tag", referenced from: -[TSLogFormatter formatLogMessage:] in TSLocationManager(TSLogFormatter.o) "_OBJC_IVAR_$_DDLogMessage._timestamp", referenced from: -[TSDBLogEntry initWithLogMessage:] in TSLocationManager(TSDBLogger.o) "_OBJC_METACLASS_$_DDAbstractDatabaseLogger", referenced from: _OBJC_METACLASS_$_TSDBLogger in TSLocationManager(TSDBLogger.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

help wanted

All 12 comments

You鈥檙e missing cocoa-lumberjack

That resolved the issue thanks a lot.

@christocracy i am facing this issues i have same 4.0.2 version for both fetch and background geolocation library
and i have cococa-lumberjack pod install with version 3.7.1

  • RNBackgroundGeolocation (4.0.2):

    • CocoaLumberjack (~> 3.7.0)

      kindly view this

Undefined symbols for architecture x86_64:
"_OBJC_IVAR_$_DDLogMessage._tag", referenced from:
-[TSLogFormatter formatLogMessage:] in TSLocationManager(TSLogFormatter.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

i get this error

I am facing the same issue right now.

$ cd ios 
$ pod install

@christocracy sir every thing is fine and installed but no sucess

@christocracy sir every thing is fine and installed but no sucess

  • Terminate XCode
$ cd ios
$ rm -rf Pods
$ rm Podfile.lock
$ pod install
  • Restart XCode
  • XCode -> Product -> Clean Build Folder

It did not help. I did all those steps.

Undefined symbols for architecture x86_64:
"_OBJC_IVAR_$_DDLogMessage._tag", referenced from:
-[TSLogFormatter formatLogMessage:] in TSLocationManager(TSLogFormatter.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Do we need to add:

platform :ios, '9.0'

target 'SampleTarget' do
pod 'CocoaLumberjack'
end

See #1284

Was this page helpful?
0 / 5 - 0 ratings