Attention! For Japanese customers, my Japanese blog might help.

Jul 17, 2016

Write contents in a WebView as a .webarchive file.

It will be an easy way to write using method such as writeTo* methods by converting to NSData with [[[[webView mainFrame] DOMDocument] webArchive] data].

For example,

    NSData *data = [[[[self.webView mainFrameDOMDocumentwebArchivedata];
    BOOL success = [data writeToFile:path atomically:YES];

There are other approaches.
Reference: How do you save to WebArchive webView editable content?
Reference: webArchive | raizan2ame

If you can't read .webarchive files written by you own app, my article "I can't open .webarchive files made by my own app." may help.