{ "id": "171652", "key": "TIMOB-26038", "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": "2018-05-14T19:24:24.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [ { "id": "56541", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "110276", "key": "TIMOB-12873", "fields": { "summary": "iOS: Optimize Kroll string usage", "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": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } }, { "id": "56540", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "105164", "key": "TIMOB-11812", "fields": { "summary": "iOS: Optimize bridge-crossing instances in Titanium Mobile API", "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": "Low", "id": "4" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } } }, { "id": "56542", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "113592", "key": "TIMOB-13729", "fields": { "summary": "Create JavaScript benchmark suite specific to Titanium use cases", "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": "Low", "id": "4" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } } }, { "id": "57646", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "173632", "key": "TIMOB-27082", "fields": { "summary": "iOS: Modules using TiBlob and built before SDK 8.1 causing app crash", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "57645", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "173642", "key": "TIMOB-27089", "fields": { "summary": "iOS: App crashes when asking for location permissions (SDK 8.1.0+)", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "56543", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "110049", "key": "TIMOB-12827", "fields": { "summary": "iOS: Simple native performance optimizations", "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": "Low", "id": "4" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "56539", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "110903", "key": "TIMOB-13011", "fields": { "summary": "Optimize Kroll hotspots", "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": "Critical", "id": "1" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "56679", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "171876", "key": "TIMOB-26179", "fields": { "summary": "iOS: Property check on proxy always returns true", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "57604", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "81773", "key": "TIMOB-5818", "fields": { "summary": "Ti API: View proxies should behave like real JS objects - or they should be wrapped", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "57605", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "143672", "key": "TIMOB-18465", "fields": { "summary": "Globals are not (over)writable", "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": "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": "2019-05-21T00:02:37.000+0000", "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" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "We currently make use of the \"legacy\" C API for JavaScriptCore. In the past few years Apple has made a much nicer Obj-C API to the framework which makes it much simpler to expose native objects to JavaScript. We already attempt to make use of this in HAL/Windows, though it's lower level, while the Obj-C API transparently does the bindings for us.\r\n\r\n- https://developer.apple.com/documentation/javascriptcore?language=objc\r\n- https://www.steamclock.com/blog/2013/05/apple-objective-c-javascript-bridge/\r\n- http://asciiwwdc.com/2013/sessions/615\r\n\r\nMore:\r\n- https://github.com/phoboslab/JavaScriptCore-iOS/blob/master/JavaScriptCore/API/tests/testapi.mm\r\n- https://github.com/WebKit/webkit/blob/dd7199d7f8f417992f60c9f1514e4b548ec923fb/Source/JavaScriptCore/API/JSWrapperMap.mm", "attachment": [], "flagged": false, "summary": "iOS: Move from legacy JavaScriptCore C Api to Obj-C API", "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": "437737", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Note also that our implementation using the JavaScriptCore C API is not very well tuned. The iOS implementation behaves similarly to how Android hyperloop does: with a generic KrollObject that is exported/bound to JS with native callbacks for getProperty/setProperty/etc which then uses the equivalent of \"reflection\" to delegate to the wrapped Obj-C instance.\r\n\r\nThe new JSExport API offers a similar proxy writing API as we currently do, but actually generates the correct bindings at the property/function level on a defined JS class specific to the Obj-C class. This avoid the need for our custom routing of calls through a generic getProperty impl, for example.\r\n\r\nWhat it does not handle though is:\r\n- indexed property access (like we use in Ti.Buffer)\r\n- setting static values for properties (i.e. we often return a static string/value for APIs such as Ti.Platform.manufacturer, JSExport will still delegate that into a method call, but using the C API we could just set a static value for that property on the JS side).", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2018-05-17T17:23:44.000+0000", "updated": "2018-05-17T17:23:44.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }