transistorsoft / cordova-background-geolocation-SampleApp

Cordova Background Geolocation Sample Application
https://www.transistorsoft.com/shop/products/cordova-background-geolocation
MIT License
122 stars 78 forks source link

GeoLocation not working on ios #24

Closed turbobuilt closed 8 years ago

turbobuilt commented 8 years ago

Hello,

I tried installing this application, and the geolocation is not working. It never asks me for my location, and when I click the locate icon in the bottom left corner, it does not take me to my current location. I have the switch in the top right set to on. What am I doing wrong? (I am on ios 8).

Thanks!

christocracy commented 8 years ago

That is very odd. Show me the logs of your app booting.

turbobuilt commented 8 years ago

Output from xcode device console

Jan 15 11:41:43 My-iPhone kernel[0] : xpcproxy[1604] Container: /private/var/mobile/Containers/Data/Application/59070709-DABB-42F8-8C5A-51E568F3FF1E (sandbox) Jan 15 11:41:43 My-iPhone locationd[64] : Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0 Jan 15 11:41:43 My-iPhone BG Geo[1604] : assertion failed: 12F70: libxpc.dylib + 51923 [89A85F22-6D73-33D8-9D7A-FCF58D58C58E]: 0x7d Jan 15 11:41:43 My-iPhone Unknown[1604] : Jan 15 11:41:43 My-iPhone BG Geo[1604] : DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/59070709-DABB-42F8-8C5A-51E568F3FF1E/Library/Cookies/Cookies.binarycookies Jan 15 11:41:43 My-iPhone BG Geo[1604] : Apache Cordova native platform version 3.8.0 is starting. Jan 15 11:41:43 My-iPhone BG Geo[1604] : Multi-tasking -> Device: YES, App: YES Jan 15 11:41:43 My-iPhone BG Geo[1604] : Unlimited access to network resources Jan 15 11:41:44 My-iPhone BG Geo[1604] : [CDVTimer][keyboard] 0.547945ms Jan 15 11:41:44 My-iPhone BG Geo[1604] : [CDVTimer][splashscreen] 382.224977ms Jan 15 11:41:44 My-iPhone BG Geo[1604] : [CDVTimer][TotalPluginStartup] 385.010958ms Jan 15 11:41:44 My-iPhone BG Geo[1604] : Resetting plugins due to page load. Jan 15 11:41:47 My-iPhone BG Geo[1604] : Finished load of: file:///private/var/mobile/Containers/Bundle/Application/08D87CDE-ADCD-4362-B7BC-F4566E351DE8/BG%20Geo.app/www/index.html#/ Jan 15 11:41:50 My-iPhone locationd[64] : Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0 Jan 15 11:41:50 My-iPhone BG Geo[1604] : WARN: Google Maps API warning: SensorNotRequired: https://developers.google.com/maps/documentation/javascript/error-messages

christocracy commented 8 years ago

I don't see anything from my plugin in there. Are you sure you followed every step of the installation instructions, especially steps 2 & 3?

turbobuilt commented 8 years ago

Ok think I found the error. I did not use sudo with step 2 or 3 and so was not working right. However, I have a new error when I build, see below. I tried removing your plugin and platform ios, and redoing everything. If I need to I can reinstall the whole thing in a new directory. Info: Cordova version: 5.0.0 npm 2.9.1 node 0.12.3 osx 10.10.5 xcode 6.4

The following build commands failed:
    Ld build/emulator/BG\ Geo.app/BG\ Geo normal i386
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Applications/MAMP/htdocs/background-location/platforms/ios/cordova/build-debug.xcconfig,-project,BG Geo.xcodeproj,ARCHS=i386,-target,BG Geo,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Applications/MAMP/htdocs/background-location/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Applications/MAMP/htdocs/background-location/platforms/ios/build/sharedpch
ERROR building one of the platforms: Error: /Applications/MAMP/htdocs/background-location/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Applications/MAMP/htdocs/background-location/platforms/ios/cordova/build: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

more output

    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(SOMotionDetector.o)
duplicate symbol _llvm.embedded.module in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(SOMotionDetector.o)
duplicate symbol _llvm.cmdline in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(Settings.o)
duplicate symbol _llvm.embedded.module in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(Settings.o)
duplicate symbol _llvm.cmdline in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(LocationManager.o)
duplicate symbol _llvm.embedded.module in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(LocationManager.o)
duplicate symbol _llvm.cmdline in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(LocationDAO.o)
duplicate symbol _llvm.embedded.module in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(LocationDAO.o)
duplicate symbol _llvm.cmdline in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSReachability.o)
duplicate symbol _llvm.embedded.module in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSReachability.o)
duplicate symbol _llvm.cmdline in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLocationManager.o)
duplicate symbol _llvm.embedded.module in:
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLogger.o)
    BG Geo/Plugins/com.transistorsoft.cordova.background-geolocation/TSLocationManager.framework/TSLocationManager(TSLocationManager.o)
ld: 12 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)