cordova-background-geolocation-SampleApp
cordova-background-geolocation-SampleApp copied to clipboard
my android app works well in ios does not pass the line of code var bgGeo = window.BackgroundGeolocation.
my android app works well in ios does not pass the line of code (IONIC 1)
In android the code works perfect, but in ios it does not work. Following up on the code, I find that it does not progress from this line. I'm testing it in a xcode simulator directly.
oback.iniBackground = function() { console.log("enter") console.log( window.BackgroundGeolocation) var bgGeo = window.BackgroundGeolocation; console.log("not
enter")`
`
this shows:
"enter" {"LOG_LEVEL_OFF":0,"LOG_LEVEL_ERROR":1,"LOG_LEVEL_WARNING":2,"LOG_LEVEL_INFO":3,"LOG_LEVEL_DEBUG":4,"LOG_LEVEL_VERBOSE":5,"DESIRED_ACCURACY_NAVIGATION":-2,"DESIRED_ACCURACY_HIGH":-1,"DESIRED_ACCURACY_MEDIUM":10,"DESIRED_ACCURACY_LOW":100,"DESIRED_ACCURACY_VERY_LOW":1000,"DESIRED_ACCURACY_THREE_KILOMETER":3000,"AUTHORIZATION_STATUS_NOT_DETERMINED":0,"AUTHORIZATION_STATUS_RESTRICTED":1,"AUTHORIZATION_STATUS_DENIED":2,"AUTHORIZATION_STATUS_ALWAYS":3,"AUTHORIZATION_STATUS_WHEN_IN_USE":4,"NOTIFICATION_PRIORITY_DEFAULT":0,"NOTIFICATION_PRIORITY_HIGH":1,"NOTIFICATION_PRIORITY_LOW":-1,"NOTIFICATION_PRIORITY_MAX":2,"NOTIFICATION_PRIORITY_MIN":-2,"ACTIVITY_TYPE_OTHER":1,"ACTIVITY_TYPE_AUTOMOTIVE_NAVIGATION":2,"ACTIVITY_TYPE_FITNESS":3,"ACTIVITY_TYPE_OTHER_NAVIGATION":4,"logger":{}} 2018-10-30 22:48:28.800066-0500 TIN[5860:44197]
on ios:
cordova-android-play-services-gradle-release 1.4.4 "cordova-android-play-services-gradle-release" cordova-background-geolocation-lt 2.14.0-beta.2 "BackgroundGeolocation" cordova-plugin-background-fetch 5.4.1 "CDVBackgroundFetch" cordova-plugin-badge 0.8.7 "Badge" cordova-plugin-camera 4.0.3 "Camera" cordova-plugin-cocoalumberjack 0.0.4 "CocoaLumberjack" cordova-plugin-device 2.0.2 "Device" cordova-plugin-facebook4 2.5.0 "Facebook Connect" cordova-plugin-geolocation 4.0.1 "Geolocation" cordova-plugin-googlemaps 2.5.0-beta-20181027-1852 "cordova-plugin-googlemaps" cordova-plugin-inappbrowser 3.0.0 "InAppBrowser" cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview" cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification" cordova-plugin-request-location-accuracy 2.2.3 "Request Location Accuracy" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova.plugins.diagnostic 4.0.10 "Diagnostic"
config.xml
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/[email protected]" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/[email protected]" width="80" />
<icon height="120" src="resources/ios/icon/[email protected]" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/[email protected]" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/[email protected]" width="120" />
<icon height="180" src="resources/ios/icon/[email protected]" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/[email protected]" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/[email protected]" width="152" />
<icon height="167" src="resources/ios/icon/[email protected]" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/[email protected]" width="58" />
<icon height="87" src="resources/ios/icon/[email protected]" width="87" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
<edit-config file="*-Info.plist" mode="merge" target="BACKGROUND_MODE_LOCATION">
<string></string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="LOCATION_ALWAYS_AND_WHEN_IN_USE_USAGE_DESCRIPTION">
<string>¿¿Permitir a "TIN" uso constante de tu ubicación para avisarte cuando estes cerca de ofertas??</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="LOCATION_ALWAYS_USAGE_DESCRIPTION">
<string>Es necesario usar tu ubicación para avisarte cuando estes cerca de ofertas</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="MOTION_USAGE_DESCRIPTION">
<string>El uso del acelerómetro aumenta la eficiencia de la batería al alternar de manera inteligente el seguimiento de la ubicación solo cuando se detecta que el dispositivo se está moviendo</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
<string>¿Permitir a "**" el acceso a tu ubicación mientras estes usando esta app?</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
<string>Tu actual ubicación será mostrada en el mapa, de acuerdo a tu posición serán mostradas tiendas cercanas</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
<string>Se accederá a tu cámara para obtener una fotografía para actualizar tu perfil</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
<string>Se accederá a tu galeria para obtener una fotografía para actualizar tu perfil</string>
</edit-config>
</platform>
.
.
.
thanks, I hope your help.
Show me XCode logs of your app booting.
1030 22:48:25.434045 1 commandlineflags.cc:1503] Ignoring RegisterValidateFunction() for flag pointer 0x103723d00: no flag found at that address 2018-10-30 22:48:25.595223-0500 TIN[5860:44197] Apache Cordova native platform version 4.5.5 is starting. 2018-10-30 22:48:25.595832-0500 TIN[5860:44197] Multi-tasking -> Device: YES, App: YES 2018-10-30 22:48:25.615659-0500 TIN[5860:44197] CDVWKWebViewEngine: trying to inject XHR polyfill 2018-10-30 22:48:25.684784-0500 TIN[5860:44197] CDVWKWebViewEngine will reload WKWebView if required on resume 2018-10-30 22:48:25.684975-0500 TIN[5860:44197] Using Ionic WKWebView 2018-10-30 22:48:25.685683-0500 TIN[5860:44197] [CDVTimer][console] 0.069976ms 2018-10-30 22:48:25.685990-0500 TIN[5860:44197] [CDVTimer][handleopenurl] 0.114918ms 2018-10-30 22:48:25.687788-0500 TIN[5860:44197] [CDVTimer][intentandnavigationfilter] 1.637936ms 2018-10-30 22:48:25.687976-0500 TIN[5860:44197] [CDVTimer][gesturehandler] 0.046968ms 2018-10-30 22:48:25.688153-0500 TIN[5860:44197] [CDVTimer][backgroundfetch] 0.048995ms 2018-10-30 22:48:25.688376-0500 TIN[5860:44197] Starting Facebook Connect plugin 2018-10-30 22:48:25.688513-0500 TIN[5860:44197] [CDVTimer][facebookconnectplugin] 0.209093ms 2018-10-30 22:48:25.690106-0500 TIN[5860:44197] [CDVTimer][cordovagooglemaps] 1.456976ms 2018-10-30 22:48:25.690325-0500 TIN[5860:44197] CDVIonicKeyboard: resize mode 1 2018-10-30 22:48:25.691187-0500 TIN[5860:44197] [CDVTimer][keyboard] 0.897050ms 2018-10-30 22:48:25.709194-0500 TIN[5860:44197] [CDVTimer][splashscreen] 17.840028ms 2018-10-30 22:48:25.709470-0500 TIN[5860:44197] [CDVTimer][diagnostic] 0.115037ms 2018-10-30 22:48:25.715748-0500 TIN[5860:44197] [CDVTimer][diagnostic_location] 6.129026ms 2018-10-30 22:48:25.716996-0500 TIN[5860:44316] [CoreBluetooth] XPC connection invalid 2018-10-30 22:48:25.717305-0500 TIN[5860:44197] [CDVTimer][diagnostic_bluetooth] 1.412034ms 2018-10-30 22:48:25.717502-0500 TIN[5860:44197] [CDVTimer][diagnostic_wifi] 0.064015ms 2018-10-30 22:48:25.717693-0500 TIN[5860:44197] [CDVTimer][diagnostic_camera] 0.083923ms 2018-10-30 22:48:25.717905-0500 TIN[5860:44197] [CDVTimer][diagnostic_notifications] 0.082016ms 2018-10-30 22:48:25.718122-0500 TIN[5860:44197] [CDVTimer][diagnostic_microphone] 0.084043ms 2018-10-30 22:48:25.720914-0500 TIN[5860:44197] [CDVTimer][diagnostic_contacts] 2.506018ms 2018-10-30 22:48:25.721149-0500 TIN[5860:44197] [CDVTimer][diagnostic_calendar] 0.063062ms 2018-10-30 22:48:25.721359-0500 TIN[5860:44197] [CDVTimer][diagnostic_reminders] 0.087023ms 2018-10-30 22:48:25.725758-0500 TIN[5860:44197] [CDVTimer][diagnostic_motion] 4.251003ms 2018-10-30 22:48:25.725899-0500 TIN[5860:44197] [CDVTimer][TotalPluginStartup] 40.328979ms 2018-10-30 22:48:25.735805-0500 TIN[5860:44197] Falling back to loading access token from NSUserDefaults because of simulator bug 2018-10-30 22:48:25.736009-0500 TIN[5860:44197] Falling back to storing access token in NSUserDefaults because of simulator bug 2018-10-30 22:48:25.736453-0500 TIN[5860:44197] Falling back to loading access token from NSUserDefaults because of simulator bug 2018-10-30 22:48:25.736611-0500 TIN[5860:44197] Falling back to storing access token in NSUserDefaults because of simulator bug 2018-10-30 22:48:25.736880-0500 TIN[5860:44197] Falling back to loading access token from NSUserDefaults because of simulator bug 2018-10-30 22:48:25.737037-0500 TIN[5860:44197] Falling back to storing access token in NSUserDefaults because of simulator bug 2018-10-30 22:48:25.817995-0500 TIN[5860:44197] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/yeison/Library/Developer/CoreSimulator/Devices/ECDCA019-4828-4AE6-AEA8-4C306FFAD337/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2018-10-30 22:48:25.818491-0500 TIN[5860:44197] [MC] Reading from private effective user settings. 2018-10-30 22:48:25.822450-0500 TIN[5860:44197] Could not successfully update network info during initialization. 2018-10-30 22:48:25.824054-0500 TIN[5860:44197] FBSDKLog: param { "advertiser_id" = "0F5BB9A7-6853-4694-812A-28A79073CD3C"; "advertiser_tracking_enabled" = 1; "anon_id" = "XZ15005213-74B8-4EE6-9B0C-8373D1D65681"; "application_tracking_enabled" = 1; "custom_events" = "[{"core_lib_included":1,"_eventName":"fb_sdk_initialize","_logTime":1540957706,"share_lib_included":1,"login_lib_included":1,"_ui":"no_ui"},{"fb_mobile_time_between_sessions":"session_quanta_2","_eventName":"fb_mobile_deactivate_app","fb_mobile_launch_source":"Unclassified","_logTime":1540956087,"_session_id":"C35D46B2-24CB-4DCF-A740-363CA4695B73","fb_mobile_app_interruptions":0,"_ui":"no_ui","_valueToSum":61},{"_ui":"no_ui","_eventName":"fb_mobile_activate_app","_logTime":1540957706,"_session_id":"FB83B353-0972-4901-8E0D-844D04D4E2C1","fb_mobile_launch_source":"Unclassified"}]"; event = "CUSTOM_APP_EVENTS"; extinfo = "["i2","com.tin.app","1.0.0","1.0.0","11.4","x86_64","en_US","GMT-5","NoCarrier",375,667,"2.00",12,39,3,"America\/Bogota"]"; "url_schemes" = "["fb380099785809127","com.tin.app"]"; } 2018-10-30 22:48:27.442245-0500 TIN[5860:44321] TIC Read Status [1:0x0]: 1:57 2018-10-30 22:48:27.442370-0500 TIN[5860:44321] TIC Read Status [1:0x0]: 1:57 2018-10-30 22:48:28.796423-0500 TIN[5860:44197] ya 2018-10-30 22:48:28.799002-0500 TIN[5860:44197] WARN: Keyboard.disableScroll() was removed 2018-10-30 22:48:28.799262-0500 TIN[5860:44197] ása 2018-10-30 22:48:28.799465-0500 TIN[5860:44197] entra 2018-10-30 22:48:28.799680-0500 TIN[5860:44197] fdas 2018-10-30 22:48:28.799888-0500 TIN[5860:44197] {"LOG_LEVEL_OFF":0,"LOG_LEVEL_ERROR":1,"LOG_LEVEL_WARNING":2,"LOG_LEVEL_INFO":3,"LOG_LEVEL_DEBUG":4,"LOG_LEVEL_VERBOSE":5,"DESIRED_ACCURACY_NAVIGATION":-2,"DESIRED_ACCURACY_HIGH":-1,"DESIRED_ACCURACY_MEDIUM":10,"DESIRED_ACCURACY_LOW":100,"DESIRED_ACCURACY_VERY_LOW":1000,"DESIRED_ACCURACY_THREE_KILOMETER":3000,"AUTHORIZATION_STATUS_NOT_DETERMINED":0,"AUTHORIZATION_STATUS_RESTRICTED":1,"AUTHORIZATION_STATUS_DENIED":2,"AUTHORIZATION_STATUS_ALWAYS":3,"AUTHORIZATION_STATUS_WHEN_IN_USE":4,"NOTIFICATION_PRIORITY_DEFAULT":0,"NOTIFICATION_PRIORITY_HIGH":1,"NOTIFICATION_PRIORITY_LOW":-1,"NOTIFICATION_PRIORITY_MAX":2,"NOTIFICATION_PRIORITY_MIN":-2,"ACTIVITY_TYPE_OTHER":1,"ACTIVITY_TYPE_AUTOMOTIVE_NAVIGATION":2,"ACTIVITY_TYPE_FITNESS":3,"ACTIVITY_TYPE_OTHER_NAVIGATION":4,"logger":{}} 2018-10-30 22:48:28.800066-0500 TIN[5860:44197] fdas
@christocracy do you see my log?
I just booted a fresh Ionic 1 app using [email protected]
. I have no issues.
Are you sure you don't have Javascript errors?
@christocracy I am using this version: [email protected] . Do you remember that you recommended it to me?
Yes, and I published 2.14.0
yesterday.
I will try that version, thanks..
same problem with 2.14.0, when "var bgGeo = window.BackgroundGeolocation;" does not advance from that line of code. I tried it on an iphone 8 using simulator, xcode
Open the Safari developer console for your app.
In the Javascript console, get a reference to the plugin:
>bgGeo = window.BackgroundGeolocation
Is the object there?