{ "id": "175896", "key": "TIMOB-28279", "fields": { "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2020-12-09T17:37:28.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "59199", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "176067", "key": "TIMOB-28364", "fields": { "summary": "TiAPI: Return Promises for async Ti.Geolocation APIs", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "59313", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "174615", "key": "TIMOB-27710", "fields": { "summary": "TiAPI: Support optional callback functions for async methods that typically fire events", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "59314", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "176192", "key": "TIMOB-28451", "fields": { "summary": "Implement promise support to Titanium APIs", "status": { "description": "This issue is being actively worked on at the moment by the assignee.", "name": "In Progress", "id": "3", "statusCategory": { "id": 4, "key": "indeterminate", "colorName": "yellow", "name": "In Progress" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "59315", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "176193", "key": "TIMOB-28452", "fields": { "summary": "Improve promise support for Ti.Proxy", "status": { "description": "This issue is being actively worked on at the moment by the assignee.", "name": "In Progress", "id": "3", "statusCategory": { "id": 4, "key": "indeterminate", "colorName": "yellow", "name": "In Progress" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "59316", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "176194", "key": "TIMOB-28453", "fields": { "summary": "Improve promise support for Ti.UI.View", "status": { "description": "This issue is being actively worked on at the moment by the assignee.", "name": "In Progress", "id": "3", "statusCategory": { "id": 4, "key": "indeterminate", "colorName": "yellow", "name": "In Progress" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2021-08-26T11:04:14.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "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. \r\n\r\n\r\nLanded:\r\n* Titanium.Android.requestPermissions\r\n* Titanium.Calendar.requestCalendarPermissions\r\n* Titanium.Contacts.requestContactsPermissions\r\n* Titanium.Database.DB.executeAsync\r\n* Titanium.Database.DB.executeAllAsync\r\n* Titanium.Filesystem.requestStoragePermissions\r\n* Titanium.Geolocation.getCurrentHeading\r\n* Titanium.Geolocation.getCurrentPosition\r\n* Titanium.Geolocation.requestLocationPermissions\r\n* Titanium.Geolocation.requestTemporaryFullAccuracyAuthorization\r\n* Titanium.Geolocation.forwardGeocoder\r\n* Titanium.Geolocation.reverseGeocoder\r\n* Titanium.Media.requestAudioRecorderPermissions\r\n* Titanium.Media.requestCameraPermissions\r\n* Titanium.Media.requestPhotoGalleryPermissions\r\n\r\nIn Progress:\r\n* Titanium.UI.View.animate\r\n* Titanium.Media.Android.scanMediaFiles\r\n* Titanium.Media.requestMusicLibraryPermissions\r\n* Titanium.Media.takeScreenshot\r\n\r\n\r\n\r\nTODO:\r\n* Titanium.Android.Activity.startActivityForResult\r\n* Titanium.App.iOS.SearchableIndex.addToDefaultSearchableIndex\r\n* Titanium.App.iOS.SearchableIndex.deleteAllSearchableItems\r\n* Titanium.App.iOS.SearchableIndex.deleteAllSearchableItemByDomainIdenifiers\r\n* Titanium.App.iOS.SearchableIndex.deleteSearchableItemsByIdentifiers\r\n* Titanium.App.iOS.UserNotificationCenter.getPendingNotifications\r\n* Titanium.App.iOS.UserNotificationCenter.getDeliveredNotifications\r\n* Titanium.App.iOS.UserNotificationCenter.requestUserNotificationSettings\r\n* Titanium.Contacts.requestAuthorization\r\n* Titanium.Media.VideoPlayer.requestThumbnailImagesAtTimes\r\n* Titanium.Network.BonjourService.publish\r\n* Titanium.Network.BonjourService.resolve\r\n* Titanium.Network.BonjourService.stop\r\n* Titanium.Platform.openURL\r\n* Titanium.UI.WebView.takeSnapshot\r\n* Titanium.UI.WebView.createPDF\r\n* Titanium.UI.WebView.createWebArchive\r\n* Titanium.UI.WebView.findString\r\n\r\nSome return non-void types if the callback is omitted, however, so migrating them may prove to be more difficult.\r\n\r\nAsync APIs that return values if callback is not supplied:\r\n\r\n* Titanium.UI.View.toImage\r\n* Titanium.UI.WebView.evalJS\r\n\r\nAdditionally some APIs *do not* take a callback but occur async, return void, and could be made to return a Promise to that they are {{await}}-able. See TIMOB-27710 (i.e. {{Window.open()}})", "attachment": [], "flagged": false, "summary": "TiAPI: Return Promises for async APIs", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "459010", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Converting to epic as this is a large chuck of work that won't be done in a single release\r\n\r\nRemoved APIs the list that are no longer present in the SDK and updated in progress APIs", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-08-26T11:01:36.000+0000", "updated": "2021-08-26T11:01:36.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }