{ "id": "136376", "key": "TIMOB-17670", "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": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-26T20:35:17.000+0000", "created": "2014-09-10T14:15:48.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-automatedtest", "supportTeam" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" }, { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "issuelinks": [ { "id": "44454", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "142258", "key": "TIMOB-18304", "fields": { "summary": "iOS: DocumentViewer not displaying DOCX files on Simulator", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-01-09T17:24:08.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": "h3. Issue\r\n\r\nUsing DocumentViewer on iOS 8 is not rendering PDF files.\r\n\r\nh3. Steps to repro\r\n\r\n1. Run test case (test.zip)\r\n2. Click on Launch Doc button\r\n3. On the navigation bar press the done button\r\n4. Click on Launch PDF button\r\n\r\nh5. Expected result:\r\n\r\nAfter clicking on Launch Doc button the .docx file is rendered in the DocumentViewer and after clicking on Launch PDF button the .pdf file is also shown in the DocumentViewer.\r\n\r\nh5. Actual result:\r\n\r\nAfter clicking on Launch Doc button the .docx file is rendered in the DocumentViewer and after clicking on Launch PDF button the .pdf file is not being shown by the DocumentViewer.\r\n\r\nh3. Sample code\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow(); \r\n// Use a NavigationWindow to create a navigation bar for the window \r\nvar navWin = Ti.UI.iOS.createNavigationWindow({window: win}); \r\n\r\nvar navButton = Titanium.UI.createButton({title:'Launch'}); \r\nwin.RightNavButton = navButton; \r\n\r\nvar docButton = Titanium.UI.createButton({ \r\ntitle:'Launch Doc', \r\nheight:40, \r\nwidth:200, \r\ntop:230 \r\n}); \r\nwin.add(docButton); \r\n\r\nvar pdfButton = Titanium.UI.createButton({ \r\ntitle:'Launch PDF', \r\nheight:40, \r\nwidth:200, \r\ntop:280 \r\n}); \r\nwin.add(pdfButton); \r\n\r\n// Create a document viewer to preview a PDF file \r\ndocViewer = Ti.UI.iOS.createDocumentViewer(); \r\n// Opens the options menu and when the user clicks on 'Quick Look' \r\n// the document viewer launches with an animated transition \r\nnavButton.addEventListener('click', function(){ \r\n\tdocViewer.show({view:navButton, animated: true}); \r\n}); \r\n// The document viewer immediately launches without an animation \r\ndocButton.addEventListener('click', function(){\r\n\tdocViewer.url = 'test1.docx';\r\n\tdocViewer.show();\r\n\t}); \r\npdfButton.addEventListener('click', function(){\r\n\tdocViewer.url = 'test.pdf';\r\n\tdocViewer.show();\r\n\t}); \r\n\r\nnavWin.open();\r\n{code}\r\n\r\nh3. Additional info\r\n\r\nThere are reports of this happening on native also apparently related to changes in how to call the UIDocumentInteractionController\r\n\r\nhttp://stackoverflow.com/questions/25430069/uidocumentinteractioncontroller-displaying-blank-pdf", "attachment": [ { "id": "51117", "filename": "test.zip", "author": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-10T14:15:48.000+0000", "size": 3933607, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS8: DocumentViewer not displaying PDF files", "creator": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 3.2.X || 3.3.X || 3.4.X", "closedSprints": [ { "id": 219, "state": "closed", "name": "2014 Sprint 19 SDK", "startDate": "2014-09-18T21:06:27.559Z", "endDate": "2014-09-27T00:00:00.000Z", "completeDate": "2014-09-29T13:58:58.022Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "323202", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I believe this is this line: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUIiOSDocumentViewerProxy.m#L28, but that looks similar to the corrected version in the SO post.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T05:03:38.000+0000", "updated": "2014-09-12T05:03:38.000+0000" }, { "id": "323214", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "reproduced problem on iOS7 as well.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T06:56:20.000+0000", "updated": "2014-09-12T06:56:20.000+0000" }, { "id": "323220", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "When trying to change url in a document viewer instance, it sometimes doesn't load the respective document in url.\r\nReason is because we are using UIDocumentInteractionController, which according to Apple API documents, is supposed to be a preview controller, and recommended to initialize an instance for every different file previewed.\r\nBug solved by creating new instance every time url is changed for document view.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T07:42:56.000+0000", "updated": "2014-09-12T07:42:56.000+0000" }, { "id": "323221", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR here https://github.com/appcelerator/titanium_mobile/pull/6062", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T07:43:24.000+0000", "updated": "2014-09-12T07:43:24.000+0000" }, { "id": "323236", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "backport PR here https://github.com/appcelerator/titanium_mobile/pull/6064", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T09:04:09.000+0000", "updated": "2014-09-12T09:04:09.000+0000" }, { "id": "323465", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and verified Document Viewer is displaying PDF files.\r\nEnvironment\r\nMac osx 10.9.4 Maverics\r\nAppcelerator Studio, build: 3.4.0.201409112242\r\nTitanium SDK, build: 3.4.0.v20140912160914\r\nacs@1.0.16\r\nalloy 1.5.0-rc\r\ninstall@0.1.7\r\nnpm@1.4.23\r\nsudo@1.0.3\r\ntitanium 3.4.0-rc2\r\ntitanium-code-processor@1.1.1\r\nXcode6\r\nDevice: iPhone 5S iOS8\r\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T23:44:32.000+0000", "updated": "2014-09-12T23:44:32.000+0000" }, { "id": "323772", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "reopened to change details", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-15T20:20:27.000+0000", "updated": "2014-09-15T20:20:27.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }