[TIMOB-13978] iOS: Geolocation - Error messages are displayed in alert instead of currentHeading and currentPosition
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-05-29T23:03:49.000+0000 |
Affected Version/s | Release 3.1.1 |
Fix Version/s | 2013 Sprint 11 API, 2013 Sprint 11 |
Components | iOS |
Labels | qe-3.1.1 |
Reporter | Anshu Mittal |
Assignee | Ingo Muschenetz |
Created | 2013-05-24T10:08:11.000+0000 |
Updated | 2013-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();
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.