{ "id": "174202", "key": "AC-6388", "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": null, "resolutiondate": null, "created": "2019-10-01T11:45:19.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-10-01T11:45:19.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": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "In our application we have local .html/.js files which we open inside a WebView component like that:\r\n\r\n{code:javascript}\r\nWebView.url = \"/Users/zozo4kin/Library/Developer/CoreSimulator/Devices/25286438-5F1B-4679-8C00-1B56A60394E4/data/Containers/Data/Application/C1C5E8BC-F355-438F-81DE-BFC615084B28/Documents/player/index.html\"\r\n{code}\r\n\r\nWebview loads 3D virtual tour inside this player and it works fine till 8 sdk. Starting from 8 sdk, Ti.UI.WebView implements WKWebView inside and this component doesn't work even with direct link to the tour, without using local player. \r\n\r\n*It's the first issue.* Ti.UI.Webview can't load this link \"https://app.immoviewer.com/portal/tour/1564596?accessKey=5d20\" starting from 8 sdk. But if we use ti.wkwebview it works! I attached the zip archive with sample app where we just open screen with UI.Webview and with ti.wkwebview and set as url link above and for UI.WebView it doesn't work, but work for ti.wkwebview native module.\r\n\r\n*The second issue is* that ti.wkwebview (and UI.WebView as well) doesn't work if we try to pass link to the local .html file like we did previously.\r\nIf we pass path to index.html to url we get this error:\r\n\r\n{code:javascript}\r\n{\"url\":\"file:///file:/Users/itelenkov/Library/Developer/CoreSimulator/Devices/91A2044F-C4D8-4EA4-A80B-E4A7625A682C/data/Containers/Data/Application/522F7607-F7B3-49E5-A9A7-A780A46C718B/Documents/player/index.html\",\"title\":\"\",\"error\":\"The requested URL was not found on this server.\",\"bubbles\":true,\"type\":\"error\",\"source\":{\"touchEnabled\":true,\"horizontalWrap\":true,\"visible\":false},\"cancelBubble\":false}\r\n{code}\r\n\r\n\"file:///file:/\" at the beginning looks weird. We tried to fix that amending source code of ti.wkwebview module like that:\r\n\r\n\r\n{code:objective-c}\r\n(void)setUrl_:(id)value\r\n{\r\n ENSURE_TYPE(value, NSString);\r\n [[self proxy] replaceValue:value forKey:@\"url\" notification:NO];\r\n\r\n if ([[self webView] isLoading]) {\r\n [[self webView] stopLoading];\r\n }\r\n\r\n // Handle remote URL's\r\n if ([value hasPrefix:@\"http\"] || [value hasPrefix:@\"https\"]) {\r\n [self loadRequestWithURL:[NSURL URLWithString:[TiUtils stringValue:value]]];\r\n // Handle local URL's (WiP)\r\n } else {\r\n\r\n// NSString *path = [[TiUtils toURL:value proxy:self.proxy] absoluteString];\r\n// Hardcode\r\n// NSString *path = @\"/Users/itelenkov/Library/Developer/CoreSimulator/Devices/91A2044F-C4D8-4EA4-A80B-E4A7625A682C/data/Containers/Data/Application/EAE3E55B-B0C1-413A-A27B-D264754F5775/Documents/player/index.html\";\r\n DebugLod(@\"Log Log Log\");\r\n [[self webView] loadFileURL:[NSURL fileURLWithPath:value]\r\n allowingReadAccessToURL:[NSURL fileURLWithPath:[value stringByDeletingLastPathComponent]]];\r\n }\r\n}\r\n{code}\r\n\r\nWe fixed this issue with \"file:///file:/\", but it doesn't work anyway and shows white screen to us. I'm attaching corrected source code of ti.wkwebview as well. \r\n\r\nI would appreciate any help. Right now we can't use and do new releases with 8 sdk. We have to stay with 7.5.2 and there is no guarantee that apple will approve us next time if we send a version without wkwebview.", "attachment": [ { "id": "67002", "filename": "testWKWebView.zip", "author": { "name": "zozo4kin", "key": "zozo4kin", "displayName": "Zakhar Zhuravlev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-01T11:37:49.000+0000", "size": 6432350, "mimeType": "application/zip" }, { "id": "67001", "filename": "ti.wkwebview-iphone-2.8.4.zip", "author": { "name": "zozo4kin", "key": "zozo4kin", "displayName": "Zakhar Zhuravlev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-01T11:43:31.000+0000", "size": 781593, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: WKWebView bizarre behaviour", "creator": { "name": "zozo4kin", "key": "zozo4kin", "displayName": "Zakhar Zhuravlev", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "zozo4kin", "key": "zozo4kin", "displayName": "Zakhar Zhuravlev", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }