{ "id": "155204", "key": "TIMOB-20485", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-05T18:30:51.000+0000", "created": "2016-02-29T13:59:21.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios", "livephotos", "qe-5.4.0" ], "versions": [ { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-08-05T18:30:57.000+0000", "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" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When I read {{Ti.UI.iOS.LivePhoto.apiName}} it return {{Ti.Proxy}} and logs:\r\n\r\n{code}\r\n[ERROR] Subclasses must override the apiName API endpoint.\r\n{code}\r\n\r\nWhich comes from:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/bdfbe4d530e81caf440b595351bc84bef79f27d4/iphone/Classes/TiProxy.m#L1310\r\n\r\n", "attachment": [], "flagged": false, "summary": "LivePhoto: Proxy should override apiName", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "5.2.0.GA", "closedSprints": [ { "id": 585, "state": "closed", "name": "2016 Sprint 5 SDK", "startDate": "2016-02-27T01:30:43.377Z", "endDate": "2016-03-12T01:30:00.000Z", "completeDate": "2016-03-14T11:50:17.995Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "378147", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/7785", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-02-29T14:49:25.000+0000", "updated": "2016-02-29T14:49:25.000+0000" }, { "id": "392402", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Demo:\r\n{code:javascript}\r\nTi.API.warn(Ti.UI.iOS.LivePhoto.apiName);\r\n{code}\r\n\r\nExpected result: \"Ti.UI.iOS.LivePhoto\"\r\n\r\n*EDIT*: See the below demo-code with the current usage instead.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-04T09:19:59.000+0000", "updated": "2016-08-05T14:04:14.000+0000" }, { "id": "392466", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "*Reopening*, {{Ti.API.warn(Ti.UI.iOS.LivePhoto.apiName)}} returns an undefined object error.\r\n\r\n*ENV*\r\n{code:java}\r\niPhone 6s (9.3.1)\r\niOS Simulator (9.3)\r\n
Mac OSX El Capitan 10.11.6\r\nStudio: 4.7.0.201607250649\r\n
Ti SDK: 5.4.0.v20160804021257\r\n
Appc NPM: 4.2.7\r\nAppc CLI: 5.4.0-38\r\nNode: v4.4.4\r\n{code}\r\n\r\n*Error*\r\n\r\n{code:java}\r\n[ERROR] : Script Error {\r\n[ERROR] : column = 461;\r\n[ERROR] : line = 1;\r\n[ERROR] : message = \"undefined is not an object (evaluating 'Ti.UI.iOS.LivePhoto.apiName')\";\r\n[ERROR] : sourceURL = \"file:///var/containers/Bundle/Application/AE7515B1-3A96-48B8-9E63-1862B94724E5/TIMOB-20396.app/app.js\";\r\n[ERROR] : stack = \"success@file:///var/containers/Bundle/Application/AE7515B1-3A96-48B8-9E63-1862B94724E5/TIMOB-20396.app/app.js:1:461\";\r\n[ERROR] : }\r\n{code}\r\n\r\n\r\n*App.js used*\r\n\r\n{code:java}\r\nTi.API.warn(Ti.UI.iOS.LivePhoto.apiName);\r\n{code}\r\n\r\n{code:java}\r\nvar window = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n});\r\n\r\nvar btn1 = Ti.UI.createButton({\r\n title: \"Select live photo!\",\r\n top: 30\r\n});\r\n\r\nbtn1.addEventListener(\"click\", openGallery);\r\nwindow.add(btn1);\r\nwindow.open();\r\n\r\nfunction openGallery() {\r\n Ti.Media.openPhotoGallery({\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO, Ti.Media.MEDIA_TYPE_LIVEPHOTO],\r\n success: function(e) {\r\n var livePhoto = e.livePhoto // Live photo of type Ti.UI.iOS.LivePhoto\r\n\r\n if (livePhoto) {\r\n var livePhotoView = Ti.UI.iOS.createLivePhotoView({\r\n livePhoto: livePhoto,\r\n muted: true,\r\n width: 300\r\n });\r\n\r\n livePhotoView.addEventListener(\"start\", function(e) {\r\n Ti.API.warn(\"-- Start playback --\");\r\n Ti.API.warn(e);\r\n });\r\n\r\n livePhotoView.addEventListener(\"stop\", function(e) {\r\n Ti.API.warn(\"-- Stop playback --\");\r\n Ti.API.warn(e);\r\n });\r\n window.add(livePhotoView);\r\n Ti.API.warn(Ti.UI.iOS.LivePhoto.apiName);\r\n }\r\n }\r\n });\r\n}\r\n{code}\r\n", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-04T21:27:51.000+0000", "updated": "2016-08-04T23:34:58.000+0000" }, { "id": "392502", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey Josh, sorry, my mistake in providing the test-case. Of course, we cannot check the {{apiName}} on the LivePhoto itself. Updated demo-code attached. Now, we log the {{apiName}} after a live-photo is selected from the library, which returns a {{Ti.UI.iOS.LivePhoto}} instance. Thanks!\r\n\r\nDemo:\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n});\r\n \r\nvar btn1 = Ti.UI.createButton({\r\n title: \"Select live photo!\",\r\n top: 30\r\n});\r\n \r\nbtn1.addEventListener(\"click\", openGallery);\r\nwindow.add(btn1);\r\nwindow.open();\r\n \r\nfunction openGallery() {\r\n Ti.Media.openPhotoGallery({\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO, Ti.Media.MEDIA_TYPE_LIVEPHOTO],\r\n success: function(e) {\r\n var livePhoto = e.livePhoto // Live photo of type Ti.UI.iOS.LivePhoto\r\n \r\n // Log the apiName\r\n Ti.API.warn(livePhoto.apiName);\r\n \r\n if (livePhoto) {\r\n var livePhotoView = Ti.UI.iOS.createLivePhotoView({\r\n livePhoto: livePhoto,\r\n muted: true,\r\n width: 300\r\n });\r\n \r\n livePhotoView.addEventListener(\"start\", function(e) {\r\n Ti.API.warn(\"-- Start playback --\");\r\n Ti.API.warn(e);\r\n });\r\n \r\n livePhotoView.addEventListener(\"stop\", function(e) {\r\n Ti.API.warn(\"-- Stop playback --\");\r\n Ti.API.warn(e);\r\n });\r\n window.add(livePhotoView);\r\n }\r\n }\r\n });\r\n}\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-05T14:03:43.000+0000", "updated": "2016-08-05T14:03:43.000+0000" }, { "id": "392543", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, thanks [~hansknoechel].\r\nTested on:\r\n{code:java}\r\niPhone 6s plus (9.3.1)\r\n
Mac OSX El Capitan 10.11.6\r\nStudio: 4.7.0.201607250649\r\n
Ti SDK: 5.4.0.v20160804185318\r\n
Appc NPM: 4.2.7\r\nAppc CLI: 5.4.0-40\r\nNode: v4.4.4\r\n{code}\r\n\r\n*Closing ticket*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-05T18:28:31.000+0000", "updated": "2016-08-05T18:28:31.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }