iOS Question Unable to load pdf in web view

Discussion in 'iOS Questions' started by highflyer, Dec 4, 2018.

  1. highflyer

    highflyer Member Licensed 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...

    Code:
    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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Where is the relevant code?
     
  3. highflyer

    highflyer Member Licensed User

    Attached is the test code I'm evaluating..
     

    Attached Files:

  4. Erel

    Erel Administrator Staff Member Licensed User

    I've updated iUI8. V1.61 should fix this issue. Note that you don't need to update anything if you are using the hosted builder.
     
  5. highflyer

    highflyer Member Licensed User

    Problem solved.

    Thank you very much..
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice