ローカルHTMLのメモ
WKWebViewで実装すると
フォルダ参照ならhtml内のlinkは./でプロジェクト直下になっているようだ。
WKWebViewは今の所、コード上で貼り付けるしかない。
WKNavigationDelegateでnavigationResponseでdocument.locationの移動を検知できる。
decisionHandler(.allow)で許可する。
challenge: URLAuthenticationChallengeで
信頼するかどうか
print("[Warning]challenge AuthenticationChallange") let cred = URLCredential(trust: challenge.protectionSpace.serverTrust!); completionHandler(.useCredential, cred)
Build Phaseでプロジェクト直下のファイルをResourceにコピーできる。
ResourceにコピーできればMainBundleから取得できる。