//// WebViewViewController.swift// Tiledesk//// Created by Dario De Pascalis on 03/04/2019.// Copyright © 2019 tiledesk. All rights reserved.//import UIKitimport WebKitclass WebViewViewController: UIViewController, WKUIDelegate {@IBOutlet weak var webView: WKWebView!@IBAction func actionClosing(_ sender: UIBarButtonItem) {dismiss(animated: true, completion: nil)}override func loadView() {let image = UIImage(named: "ic_navigation_bar")!let nav = self.navigationController?.navigationBarlet tintColor = UIColor(red: 51, green: 71, blue: 94, alpha: 1)nav?.setupNavigationBar(barStyleBlack: true, tintColor: tintColor, image: image)let webConfiguration = WKWebViewConfiguration()webView = WKWebView(frame: .zero, configuration: webConfiguration)webView.uiDelegate = selfview = webView}override func viewDidLoad() {super.viewDidLoad()let url = "https://widget.tiledesk.com/v4/assets/twp/index.html?isOpen=true&tiledesk_projectid=<CHANGE_IT>&tiledesk_fullscreenMode=true&tiledesk_hideHeaderCloseButton=true&tiledesk_isopen=true"let myURL = URL(string:url)let myRequest = URLRequest(url: myURL!)webView.load(myRequest)}/*// MARK: - Navigation// In a storyboard-based application, you will often want to do a little preparation before navigationoverride func prepare(for segue: UIStoryboardSegue, sender: Any?) {// Get the new view controller using segue.destination.// Pass the selected object to the new view controller.}*/}
Find here other widget parameters to customize your experience.
Create a Web View Controller in your Story Board and add a WebView as below: