Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 8    Views: 87

Racer X
buzztouch Evangelist
Profile
Posts: 129
Reg: Mar 24, 2011
Boston, MA
5,490
12/31/14 06:08 PM (9 years ago)

User location shows 0 latitude and 0 longitude on iPhone

I have a map and send sms plugin doing the same thing in the app I am developing. The maps works great, and the sms works great. Its the user location that is incorrect. I have allow gps turned on, and the app location "always" turned on in iPhone settings. Anyone run into this one before?
 
Racer X
buzztouch Evangelist
Profile
Posts: 129
Reg: Mar 24, 2011
Boston, MA
5,490
like
12/31/14 08:18 PM (9 years ago)
Here is the error Xcode is showing: 2014-12-31 22:09:19.587 troopquiz[182:4016] BT_screen_map: parseScreenData 2014-12-31 22:09:19.598 troopquiz[182:4016] BT_screen_map: layoutScreen 2014-12-31 22:09:20.606 troopquiz[182:4016] BT_screen_map: mapView:centerMap 2014-12-31 22:09:41.848 troopquiz[182:4016] BT_screen_map: mapView:centerDeviceLocation 2014-12-31 22:09:41.856 troopquiz[182:4016] ERROR: Trying to select an annotation which has not been added 2014-12-31 22:09:42.509 troopquiz[182:4016] BT_viewUtilities: getProgressView 2014-12-31 22:09:42.993 troopquiz[182:4016] BT_viewUtilities: getProgressView 2014-12-31 22:10:07.749 troopquiz[182:4016] BT_screen_map: mapView:centerDeviceLocation 2014-12-31 22:10:07.750 troopquiz[182:4016] ERROR: Trying to select an annotation which has not been added 2014-12-31 22:10:10.599 troopquiz[182:4016] BT_screen_map: mapView:centerDeviceLocation 2014-12-31 22:10:10.600 troopquiz[182:4016] ERROR: Trying to select an annotation which has not been added
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/01/15 02:10 AM (9 years ago)
In your app control panel 'core' settings, did you turn GPS on there as well? When the app starts fresh (delete/clean if you have to) do you get the dialog box asking to allow location updates? Cheers! -- Smug
 
Racer X
buzztouch Evangelist
Profile
Posts: 129
Reg: Mar 24, 2011
Boston, MA
5,490
like
01/01/15 06:53 AM (9 years ago)
Thanks Smug, yes GPS is on in core settings. I got the box a few times. I installed a dummy app with only two GPS plugins and neither of them worked either, although the standard iPhone map works fine. So its something with my phone I think. I am installing the latest iOS update to see if that fixes it.
 
Racer X
buzztouch Evangelist
Profile
Posts: 129
Reg: Mar 24, 2011
Boston, MA
5,490
like
01/01/15 08:10 AM (9 years ago)
Here is what i get in Xcode when trying to select user location: 2015-01-01 10:02:09.465 racerxtest[188:4918] BT_screen_map: mapView:centerDeviceLocation 2015-01-01 10:02:09.466 racerxtest[188:4918] ERROR: Trying to select an annotation which has not been added
 
Racer X
buzztouch Evangelist
Profile
Posts: 129
Reg: Mar 24, 2011
Boston, MA
5,490
like
01/01/15 08:11 AM (9 years ago)
And here is the config data: {"BT_appConfig": { "BT_items":[ {"itemId":"JA876AE3ECCC8345C5D5B4DAE", "itemType":"BT_app", "buzztouchAppId":"JA876AE3ECCC8345C5D5B4DAE", "buzztouchAPIKey":"45E691D3AF6952696109A27", "dataURL":"https://www.buzztouch.com/api/app/?command=getAppData&appGuid=JA876AE3ECCC8345C5D5B4DAE&apiKey=45E691D3AF6952696109A27&apiSecret=D61B50CEC010A9BD2146A17", "reportToCloudURL":"https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=JA876AE3ECCC8345C5D5B4DAE&apiKey=45E691D3AF6952696109A27&apiSecret=D61B50CEC010A9BD2146A17&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]", "registerForPushURL":"https://www.buzztouch.com/api/app/?command=registerForPush&appGuid=JA876AE3ECCC8345C5D5B4DAE&apiKey=45E691D3AF6952696109A27&apiSecret=D61B50CEC010A9BD2146A17&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]", "lastModified":"Thu, 01 Jan 2015 15:01:15 -0800", "lastPublished":"Thu, 01 Jan 2015 15:01:15 -0800", "name":"RacerXtest", "version":"1.0", "currentMode":"Design", "startLocationUpdates":"1", "promptForPushNotifications":"0", "allowRotation":"largeDevicesOnly", "BT_themes":[{"itemId":"9E71959AF8DE9E47D512FA9", "itemType":"BT_theme", "backgroundColor":"#FFFFFF"} ], "BT_tabs":[ ], "BT_menus":[ ], "BT_screens":[{"itemId":"7499586D50DE82402CE8A10", "itemType":"BT_screen_menuListSimple", "itemNickname":"Home Screen Menu", "navBarTitleText":"Home", "childItems":[{"itemId":"C7E0F68152172871F2FA4FF", "itemType":"BT_menuItem", "loadScreenWithItemId":"9734542756039988DD222A2", "titleText":"location map"}, {"itemId":"268A88103464444C6AD53FF", "itemType":"BT_menuItem", "loadScreenWithItemId":"3F248054D2A769A34BE6C38", "titleText":"Allow GPS"}]}, {"itemId":"9734542756039988DD222A2", "itemType":"BT_screen_map", "itemNickname":"Location Map", "itemId":"9734542756039988DD222A2", "itemType":"BT_screen_map", "itemNickname":"Location Map", "navBarTitleText":"Location Map", "showUserLocation":"1", "showUserLocationButton":"1", "defaultMapType":"standard", "showMapTypeButtons":"1", "showRefreshButton":"1", "singleLocationDefaultZoom":"15", "dataURL":"https://www.buzztouch.com/applications063014/JA876AE3ECCC8345C5D5B4DAE/documents/testalocation.txt", "childItems":[]}, {"itemId":"3F248054D2A769A34BE6C38", "itemType":"BT_screen_settingsLocation", "itemNickname":"Allow GPS", "navBarTitleText":"Allow GPS"} ] } ] }}
 
Racer X
buzztouch Evangelist
Profile
Posts: 129
Reg: Mar 24, 2011
Boston, MA
5,490
like
01/01/15 08:12 AM (9 years ago)
Any help is much appreciated.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/01/15 04:41 PM (9 years ago)
So, according to your config file as posted above, what you have is a sparse 'test' app that has 3 'screens'; Menu, Map, and Settings. According to all 'information' that I can get from the config, things 'should' work. But if they're not, then you're going to need to dig a little deeper. Forgive the redundancy if I've asked/suggested this before: 1) Have you tried a different device? 2) Are you 'code familiar'? Try adding these statements at the bottom your BT_screen_map.m files "layoutScreen" method. This will ensure that all that is 'supposed' to happen will do so by the time it reaches there: <yourApp>_appDelegate *appDelegate = (<yourApp>_appDelegate *)[[UIApplication sharedApplication] delegate]; [BT_debugger showIt:self theMessage:[NSString stringWithFormat:@"Coordinates: %@,%@",appDelegate.rootDevice.deviceLatitude,appDelegate.rootDevice.deviceLongitude]]; Naturally, substitute your actual App Name in the appDelegate line. Scan the logs and see if it 'prints' the device location. If it comes up blank, it's not the app; try a different device. Cheers! -- Smug
 
Racer X
buzztouch Evangelist
Profile
Posts: 129
Reg: Mar 24, 2011
Boston, MA
5,490
like
01/02/15 06:08 AM (9 years ago)
Thanks Smug. I tried a bunch of things with no luck. Its definitely my device as no BT apps will display user locations, even new dummy apps for testing regardless of settings. I even re-installed iOS. Very weird, and probably something obvious. But for now I will move on until I can check it on another device (soon). My app is primarily a quiz app and I can add the map screen later in the development process or just leave it off. I appreciate your time and advice, your the best.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.