iOS Question Unable to load pdf in web view

highflyer

Member
Licensed User
Longtime User
I'm trying to display a pdf file in a WKWWebView (iUI8 ver.1.51),
first copying the pdf file from File.DirAssests to File.DirLibrary...

B4X:
file:///var/mobile/Containers/Data/Application/B3C94E3A-FF99-4369-97D4-3E8839E5EB65/Library/eyestruct.pdf
file:///private/var/mobile/Containers/Data/Application/B3C94E3A-FF99-4369-97D4-3E8839E5EB65/tmp/virtual_assets/eyestruct.pdf
Error occurred on line: 45 (Splash)
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[1]
Stack Trace: (
  CoreFoundation       <redacted> + 152
  libobjc.A.dylib      objc_exception_throw + 38
  CoreFoundation       <redacted> + 306
  CoreFoundation       <redacted> + 44
  Optical Illusions    -[B4IWKWebViewDelegate webView:didFailProvisionalNavigation:withError:] + 332
  WebKit               <redacted> + 198
  WebKit               <redacted> + 218
  WebKit               <redacted> + 62
  WebKit               <redacted> + 102
  WebKit               <redacted> + 80
 WebKit               <redacted> + 14
 WebKit               <redacted> + 110
 WebKit               <redacted> + 180
 JavaScriptCore       <redacted> + 114
 JavaScriptCore       <redacted> + 22
 CoreFoundation       <redacted> + 12
 CoreFoundation       <redacted> + 424
 CoreFoundation       <redacted> + 1160
 CoreFoundation       CFRunLoopRunSpecific + 470
 CoreFoundation       CFRunLoopRunInMode + 104
 GraphicsServices     GSEventRunModal + 80
 UIKit                UIApplicationMain + 150
 Optical Illusions    main + 106
 libdyld.dylib        <redacted> + 2
)
SignalHandler 6
 
Top