Closed ankithryali closed 1 year ago
$ cordova plugins
$ cordova plugins
com-sarriaroman-photoviewer 1.2.4 "PhotoViewer" cordova-background-geolocation-lt 4.9.3 "BackgroundGeolocation" cordova-background-geolocation-plugin 2.0.7 "cordova-background-geolocation-plugin" cordova-plugin-background-fetch 7.1.2 "CDVBackgroundFetch" cordova-plugin-camera 6.0.0 "Camera" cordova-plugin-device 2.0.2 "Device" cordova-plugin-file 7.0.0 "File" cordova-plugin-geolocation 4.1.0 "Geolocation" cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview" cordova-plugin-nativestorage 2.3.2 "NativeStorage" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-statusbar 2.4.3 "StatusBar"
"cordova-background-geolocation-plugin"
Remove it.
btw, I highly recommend you migrate to Capacitor.
"cordova-background-geolocation-plugin"
Remove it.
btw, I highly recommend you migrate to Capacitor.
This worked and plugin is working seamlessly. Thank you so much. I have a question though - With the above configuration, HTTP request is being sent only once though I have received the multiple locations in onLocation listener. How can I let the plugin send http req on every heartbeat?
And, can you please tell me why you recommended me to migrate to Capacitor?
why you recommended me to migrate to Capacitor?
Cordova is old. It’s becoming a junk pile. There is little active development support on the framework and many plugins are becoming obsolete.
most experienced developers are migraating to Capacitor.
Your Environment
cordova -v
): 11.0.0ionic cordova -v
): 6.20.3cordova platform ls
): ios 6.2.0#ready
:Expected Behavior
Should build the iOS app
Actual Behavior
Failing to build with an error xcodebuild: Command failed with exit code 65 Error: xcodebuild: Command failed with exit code 65 at ChildProcess.whenDone (/Users/ankithryali/Documents/GitHub/VendorApp/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js:136:25) at ChildProcess.emit (node:events:390:28) at maybeClose (node:internal/child_process:1064:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
Steps to Reproduce
Context
I was trying to use the plugin to fetch background location. But iOS build failed only if this plugin is present.
At first, pods asked me to pristine the ffi, but error persists even after doing that. I have googled the error for hours and tried almost everything including: Installing cocoapods using Brew, using gem Uninstalled and reinstalled Cocoapods, gem, ffi, ruby "gem install ffi --version 1.15.1 --user-install" - tried brew and gem, sudo and non sudo "arch -x86_64 sudo gem install ffi" "gem pristine ffi --version 1.15.3" "pod repo update" updated pod repo, reinstall pod using brew
Removed and added plugin, removed and add platform,
Debug logs
Logs
``` /Users/myusername/Documents/GitHub/VendorApp/platforms/ios/build/emulator/TSLocationManager.framework/TSLocationManager(SOMotionDetector.o) duplicate symbol '_kMinimumRunningAcceleration' in: /Users/myusername/Library/Developer/Xcode/DerivedData/HOA_Plus-hgtqhqunhlbuhfaraffnbmwfycgf/Build/Intermediates.noindex/HOA Plus.build/Debug-iphonesimulator/HOA Plus.build/Objects-normal/x86_64/SOMotionDetector.o /Users/myusername/Documents/GitHub/VendorApp/platforms/ios/build/emulator/TSLocationManager.framework/TSLocationManager(SOMotionDetector.o) duplicate symbol '_kMinimumSpeed' in: /Users/myusername/Library/Developer/Xcode/DerivedData/HOA_Plus-hgtqhqunhlbuhfaraffnbmwfycgf/Build/Intermediates.noindex/HOA Plus.build/Debug-iphonesimulator/HOA Plus.build/Objects-normal/x86_64/SOMotionDetector.o /Users/myusername/Documents/GitHub/VendorApp/platforms/ios/build/emulator/TSLocationManager.framework/TSLocationManager(SOMotionDetector.o) ld: 132 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ** BUILD FAILED ** The following build commands failed: Ld /Users/myusername/Documents/GitHub/VendorApp/platforms/ios/build/emulator/HOA\ Plus.app/HOA\ Plus normal (in target 'HOA Plus' from project 'HOA Plus') (1 failure) Command finished with error code 65: xcodebuild -workspace,HOA Plus.xcworkspace,-scheme,HOA Plus,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 14 Pro Max,build,CONFIGURATION_BUILD_DIR=/Users/myusername/Documents/GitHub/VendorApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/myusername/Documents/GitHub/VendorApp/platforms/ios/build/sharedpch xcodebuild: Command failed with exit code 65 Error: xcodebuild: Command failed with exit code 65 at ChildProcess.whenDone (/Users/myusername/Documents/GitHub/VendorApp/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js:136:25) at ChildProcess.emit (node:events:390:28) at maybeClose (node:internal/child_process:1064:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) [ERROR] An error occurred while running subprocess cordova. cordova build ios --verbose exited with exit code 65. Re-running this command with the --verbose flag may provide more information. ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms ionic:utils-process onBeforeExit handler: running 2 functions +0ms ionic:utils-process processExit: exiting (exit code: 65) +53ms ```