0

WKWebView is added as a sub-view of another View Controller to show the images from the Documents directory which is being downloaded from server.

File url : file:///var/mobile/Containers/Data/Application/CFA85E24-7526-447D-81CD-4C86D3A3D3D6/Documents/2C12699C-994F-4860-8785-8015E9E4BBB9.jpeg)

wkWebView.loadFileURL("file:///var/mobile/Containers/Bundle/Application/756EF089-4B8B-4F86-B834-9DFB8325A030/App.app/www/index.html", allowingReadAccessToURL:"file:///var/mobile/Containers/Bundle/Application/0DDD77E6-2B05-4D99-AD9D-114F123565A2/App.app/")

Is this is a bug from Apple or am I missing any configuration to make it work?

Krish Lakshmanan
  • 760
  • 7
  • 13

1 Answers1

0

As a temporary solution, it can be accessed using GCDWebServer which has to serve the Documents directory.

Krish Lakshmanan
  • 760
  • 7
  • 13