[TIMOB-28364] TiAPI: Return Promises for async Ti.Geolocation APIs
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-02-22T18:33:01.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.0.0 |
Components | TiAPI |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2021-02-22T18:31:13.000+0000 |
Updated | 2021-04-13T12:28:04.000+0000 |
Description
We have a large number of APIs that take callbacks as arguments. Many can be modified to return a Promise. A few have been modified as part of the initial PR landing native Promise support.
It's easier to take it module-by-module, so here's the Ti.Geolocation targets:
* Titanium.Geolocation.forwardGeocoder
* Titanium.Geolocation.reverseGeocoder
* Titanium.Geolocation.getCurrentHeading
* Titanium.Geolocation.getCurrentPosition
* Titanium.Geolocation.requestLocationPermissions
* Titanium.Geolocation.requestTemporaryFullAccuracyAuthorization
https://github.com/appcelerator/titanium_mobile/pull/12349
Landed on master for 10.0.0 target.