let path = Bundle.main.path(forResource: "svgNameFileHere", ofType: "svg")!
if path != "" {
let fileURL:URL = URL(fileURLWithPath: path)
let req = URLRequest(url: fileURL)
self.webView.scalesPageToFit = false
self.webView.loadRequest(req)
}
else {
//handle here if path not found
}
Third party libraries
https://github.com/exyte/Macaw
https://github.com/mchoe/SwiftSVG
UIWebView and WKWebView booster to load faster