cordova-background-geolocation-lt icon indicating copy to clipboard operation
cordova-background-geolocation-lt copied to clipboard

IOS - clang: error: linker command failed with exit code 1 (use -v to see invocation)

Open codingwithashu opened this issue 2 years ago • 20 comments

Your Environment

  • Plugin version: 4.15.3
  • Platform: iOS or Android - IOS
  • OS version: macbook air 2
  • Device manufacturer / model:
  • Cordova version (cordova -v): 12.0.0 ([email protected])
  • Cordova platform version (cordova platform ls):
  • Plugin config provided to #ready:

com.ourcodeworld.appinstalled 1.0.0 "Our Code World App Installed" cordova-background-geolocation-lt 4.15.3 "BackgroundGeolocation" cordova-plugin-actionsheet 2.3.3 "ActionSheet" cordova-plugin-android-permissions 1.1.3 "Permissions" cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter" cordova-plugin-appavailability 0.4.2 "AppAvailability" cordova-plugin-background-fetch 7.2.1 "CDVBackgroundFetch" cordova-plugin-camera-preview 0.12.3 "cordova-plugin-camera-preview" cordova-plugin-camera 6.0.1-dev "Camera" cordova-plugin-cszbar 1.3.2 "ZBar barcode scanner" cordova-plugin-device 2.0.2 "Device" cordova-plugin-dialogs 2.0.2 "Notification" cordova-plugin-file-opener2 3.0.5 "File Opener2" cordova-plugin-file-transfer 2.0.0 "File Transfer" cordova-plugin-file 8.0.1-dev "File" cordova-plugin-googlemaps 2.7.1 "cordova-plugin-googlemaps" cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview" cordova-plugin-network-information 3.0.0 "Network Information" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-statusbar 2.4.2 "StatusBar" ionic-plugin-deeplinks 1.0.22 "Ionic Deeplink Plugin" onesignal-cordova-plugin 3.0.4 "OneSignal Push Notifications" uk.co.workingedge.phonegap.plugin.launchnavigator 5.0.6 "Launch Navigator"


## Context
d: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
  _OBJC_CLASS_$_DDASLLogger, referenced from:
       in TSLocationManager[arm64][15](TSLog.o)
  _OBJC_CLASS_$_DDAbstractDatabaseLogger, referenced from:
      _OBJC_CLASS_$_TSDBLogger in TSLocationManager[arm64][8](TSDBLogger.o)
  _OBJC_CLASS_$_DDLog, referenced from:
       in TSLocationManager[arm64][3](LocationAuthorization.o)
  _OBJC_CLASS_$_DDOSLogger, referenced from:
       in TSLocationManager[arm64][15](TSLog.o)
  _OBJC_CLASS_$_DDTTYLogger, referenced from:
       in TSLocationManager[arm64][15](TSLog.o)
  _OBJC_IVAR_$_DDAbstractDatabaseLogger._maxAge, referenced from:
      -[TSDBLogger getLog:] in TSLocationManager[arm64][8](TSDBLogger.o)
      -[TSDBLogger db_delete] in TSLocationManager[arm64][8](TSDBLogger.o)
  _OBJC_IVAR_$_DDAbstractDatabaseLogger._saveThreshold, referenced from:
      -[TSDBLogger initWithLogDirectory:] in TSLocationManager[arm64][8](TSDBLogger.o)
  _OBJC_IVAR_$_DDAbstractLogger._logFormatter, referenced from:
      -[TSDBLogger db_log:] in TSLocationManager[arm64][8](TSDBLogger.o)
  _OBJC_IVAR_$_DDLogMessage._context, referenced from:
      -[TSDBLogEntry initWithLogMessage:] in TSLocationManager[arm64][8](TSDBLogger.o)
  _OBJC_IVAR_$_DDLogMessage._flag, referenced from:
      -[TSDBLogEntry initWithLogMessage:] in TSLocationManager[arm64][8](TSDBLogger.o)
  _OBJC_IVAR_$_DDLogMessage._message, referenced from:
      -[TSDBLogEntry initWithLogMessage:] in TSLocationManager[arm64][8](TSDBLogger.o)
  _OBJC_IVAR_$_DDLogMessage._timestamp, referenced from:
      -[TSDBLogEntry initWithLogMessage:] in TSLocationManager[arm64][8](TSDBLogger.o)
  _OBJC_METACLASS_$_DDAbstractDatabaseLogger, referenced from:
      _OBJC_METACLASS_$_TSDBLogger in TSLocationManager[arm64][8](TSDBLogger.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)


codingwithashu avatar Nov 14 '23 14:11 codingwithashu

Remove / re-add the Cordova ios platform.

christocracy avatar Nov 14 '23 14:11 christocracy

did still same error

codingwithashu avatar Nov 14 '23 14:11 codingwithashu

What version of XCode are you using?

christocracy avatar Nov 14 '23 14:11 christocracy

Version 15.0.1 (15A507)

codingwithashu avatar Nov 14 '23 14:11 codingwithashu

show me your platforms/ios/Podfile

christocracy avatar Nov 14 '23 14:11 christocracy

DO NOT MODIFY -- auto-generated by Apache Cordova

source 'https://cdn.cocoapods.org/' platform :ios, '11.0'

target 'SOS Lite' do project 'SOS Lite.xcodeproj' pod 'CocoaLumberjack', '3.7.2' end

codingwithashu avatar Nov 14 '23 14:11 codingwithashu

In that folder, run $ pod install

christocracy avatar Nov 14 '23 14:11 christocracy

Analyzing dependencies Downloading dependencies Generating Pods project Integrating client project Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

[!] The SOS Lite [Debug] target overrides the PODS_PODFILE_DIR_PATH build setting defined in Pods/Target Support Files/Pods-SOS Lite/Pods-SOS Lite.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or - Remove the build settings from the target.

[!] The SOS Lite [Debug] target overrides the PODS_ROOT build setting defined in Pods/Target Support Files/Pods-SOS Lite/Pods-SOS Lite.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or - Remove the build settings from the target.

[!] The SOS Lite [Release] target overrides the PODS_PODFILE_DIR_PATH build setting defined in Pods/Target Support Files/Pods-SOS Lite/Pods-SOS Lite.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or - Remove the build settings from the target.

[!] The SOS Lite [Release] target overrides the PODS_ROOT build setting defined in Pods/Target Support Files/Pods-SOS Lite/Pods-SOS Lite.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or - Remove the build settings from the target.

codingwithashu avatar Nov 14 '23 14:11 codingwithashu

I suggest you follow the instructions in the warning:

The SOS Lite [Debug] target overrides the PODS_PODFILE_DIR_PATH build setting defined in Pods/Target Support Files/Pods-SOS Lite/Pods-SOS Lite.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or

  • Remove the build settings from the target.

christocracy avatar Nov 14 '23 14:11 christocracy

If i remove that , getting new error index/SOS\\ Lite.build/Debug-iphonesimulator/SOS\\ Lite.build/Script-6D4D156ED98FDAF483AC4DE8.sh diff: /Podfile.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

and also in platforms/ios -- run pod install then also same

codingwithashu avatar Nov 14 '23 14:11 codingwithashu

I have no idea what's wrong with your app.

I suggest you attempt to reproduce this in a simple HelloWorld app.

christocracy avatar Nov 14 '23 14:11 christocracy

I attached ionic test app

https://drive.google.com/file/d/1NuQUr70adzjicfqRCtvZvJuCjqghfNtS/view?usp=sharing

codingwithashu avatar Nov 14 '23 15:11 codingwithashu

Your zipfile is messed up, it contains a weird __MACOS folder with an apparent duplicate of the folder ionictest.

Also, you added the node_modules folder to your zip file.

While attempting to run $ ionic cordova build ios:

Screenshot 2023-11-14 at 1 00 47 PM

Publish your demo app to a public Git repo instead and share the url here.

christocracy avatar Nov 14 '23 18:11 christocracy

Did you actually test your helloworld before sending it to me?

christocracy avatar Nov 14 '23 18:11 christocracy

I have tested getting same error

codingwithashu avatar Nov 14 '23 18:11 codingwithashu

Publish your hello-world to a public repository and post the link here.

christocracy avatar Nov 14 '23 18:11 christocracy

https://github.com/codingwithashu/myApp

codingwithashu avatar Nov 14 '23 18:11 codingwithashu

$ git clone ...
$ npm install
$ ionic cordova platform add ios
$ ionic cordova build ios
Screenshot 2023-11-14 at 1 00 47 PM

christocracy avatar Nov 14 '23 18:11 christocracy

Try to install - npm install @ionic/cordova-builders

codingwithashu avatar Nov 14 '23 18:11 codingwithashu

I'm not going to manually install anything on my end. Give me a simple hello-world app that works out of the box.

christocracy avatar Nov 14 '23 18:11 christocracy

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Apr 17 '24 01:04 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 01 '24 01:05 github-actions[bot]