iOS project with a WKWebView that loads local resources, based on one of my SO answers.
- Local HTML, CSS and JS files
- Remote HTML, CSS and JS files (as requested by edon2005):
- downloading a zip & unzipping (Alamofire + Zip)
- Loading those unzipped files that are saved in /Documents/ in the WKWebView - HTML, CSS and JS
- Clone project
pod install
- In
ViewController.swift
on LOC 66let loadCustomFiles = true
is used to decide whether to download the zip and load its contents into WKWebView or to load the local /web folder in the Bundle. So changes this accordingly. I was thinking of making this option a new ViewController with 2 options where you can segue to the right WKWebView but this project should just showcase the functionality and UX stuff is not really needed.
- identical project for macOS