Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13978] iOS: Geolocation - Error messages are displayed in alert instead of currentHeading and currentPosition

GitHub Issuen/a
TypeStory
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2013-05-29T23:03:49.000+0000
Affected Version/sRelease 3.1.1
Fix Version/s2013 Sprint 11 API, 2013 Sprint 11
ComponentsiOS
Labelsqe-3.1.1
ReporterAnshu Mittal
AssigneeIngo Muschenetz
Created2013-05-24T10:08:11.000+0000
Updated2013-06-11T08:31:15.000+0000

Description

Error messages are displayed in alert instead of currentHeading and currentPosition. This is not regression since the issue occurs in 3.1.0 GA as well. Steps to reproduce: 1. Create an app using the code below. 2. launch the app. Actual: Two alerts are dispalyed stating: Error: Invalid type passed to the function. Expected: Should display current heading and current position null alerts.
Titanium.UI.setBackgroundColor('#000');

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});

function test(fn)
		{
			try { fn(); }
			catch(e) { alert(e.toString()); }
		}
		
		test(function(){
			Ti.Geolocation.getCurrentHeading();
		});
		
		test(function(){
			Ti.Geolocation.getCurrentPosition();
		});
		
		win1.open();

Comments

  1. Anshu Mittal 2013-06-11

    Tested with: SDK:3.1.1.v20130610164554 Appcelerator Studio: 3.1.1.201306101955 OS: OSX 10.7.5 Device:iPhone5(v 6.0) Xcode: 4.6 Tested the given app, works fine.

JSON Source