{ "id": "173937", "key": "AC-6321", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-12-27T15:54:27.000+0000", "created": "2019-07-25T10:30:15.000+0000", "labels": [ "webView" ], "versions": [], "issuelinks": [], "assignee": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "updated": "2019-12-27T15:54:27.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Apparently WebViews on iOS devices can't read files from the applicationDataDirectory.\r\nThe code below takes a file from the resourcesDirectory, writes the content to a new file in applicationDataDirectory and passes its nativePath to a WebView for display.\r\nThis works on Android devices and emulator, as well as in iOS Simulator.\r\nThis used to work on iOS devices before SDK Release 8.0.0\r\n\r\n\r\n{code:java}\r\n$.index.open();\r\nvar testhtml = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"test.html\");\r\ntesthtml.write(String(Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, \"test.html\").read()));\r\nvar f = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"test.html\");\r\n$.webview.url = f.nativePath;\r\n{code}", "attachment": [ { "id": "66786", "filename": "index.js", "author": { "name": "AceMcLoud", "key": "acemcloud", "displayName": "Ace McLoud", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-25T10:28:59.000+0000", "size": 322, "mimeType": "application/x-javascript" }, { "id": "66785", "filename": "index.xml", "author": { "name": "AceMcLoud", "key": "acemcloud", "displayName": "Ace McLoud", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-25T10:29:14.000+0000", "size": 177, "mimeType": "text/xml" }, { "id": "66787", "filename": "test.html", "author": { "name": "AceMcLoud", "key": "acemcloud", "displayName": "Ace McLoud", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-25T10:28:54.000+0000", "size": 307, "mimeType": "text/html" } ], "flagged": false, "summary": "iOS WebView won't read files from applicationDataDirectory", "creator": { "name": "AceMcLoud", "key": "acemcloud", "displayName": "Ace McLoud", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "AceMcLoud", "key": "acemcloud", "displayName": "Ace McLoud", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 8.0 and above, iOS, device only", "comment": { "comments": [ { "id": "450354", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~AceMcLoud] Please see TIMOB-27159. It looks duplicate of this. Thanks!", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-08-08T17:55:09.000+0000", "updated": "2019-08-08T17:55:09.000+0000" }, { "id": "450787", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~AceMcLoud], The issue will be solved in the 8.2.0.GA release. Right now, we will keep this ticket open as a duplicate. We will update you once the 8.2.0 GA release is available. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-08-23T16:59:19.000+0000", "updated": "2019-08-23T16:59:19.000+0000" }, { "id": "451668", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~AceMcLoud], Can you please follow up the status of the issue in SDK 8.2.0.GA? Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-09-27T17:35:13.000+0000", "updated": "2019-09-27T17:35:13.000+0000" }, { "id": "453324", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "[~AceMcLoud] I see it works as expected with TI SDK 8.2.0.GA and later version.\r\n\r\nThanks!", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2019-12-27T15:53:53.000+0000", "updated": "2019-12-27T15:53:53.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }