0

i'm creating an application that generates invoice .It uses html and javascript.Every thing is working perfectly but it is not showing logo image.Any help would be appreciated.

The Dude
  • 41
  • 5

1 Answers1

0

You can load resources from your app's bundle via a custom URL scheme, e.g. my_url_scheme://logo.png (replace my_url_scheme with something unique of your choice).

You need to implement a WKURLSchemeHandler and registering it with your WKWebView via -[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:]. Your WKURLSchemeHandler will be responsible for handling any requests with the my_url_scheme:// scheme, and can load the appropriate resource from the app's bundle and return it there.

Supersheep
  • 236
  • 2
  • 7