2

An application has been written using WKWebView. Everything works fine on a test server. Moved the web part to the customer's server. Immediately when trying to load the first page, an error occurred in didFailProvisionalNavigation.

"didFailProvisionalNavigation", "Error Domain=WKErrorDomain Code=13 "localized string not found" UserInfo={_WKRecoveryAttempterErrorKey=<WKReloadFrameErrorRecoveryAttempter: 0x2807a4020>, NSErrorFailingURLStringKey=https://XXXXXX, NSErrorFailingURLKey=https://XXXXXX, NSLocalizedDescription=localized string not found}"

The application defines the localizations Base, English (en) and Russian (ru).

Everything works fine on the old server.

Old test server: DB - Oracle 10.2.0.4 HTTP Server - OHS - 11 OS - WS2012R2

New broken server: DB - Oracle 11.2.0.4 OHS - 12.1.3.0.0 OS - Windows Server 2008 R2 Enterprise

WKWebView settings:

let configuration = WKWebViewConfiguration()
configuration.preferences.javaScriptEnabled = true
configuration.preferences.javaScriptCanOpenWindowsAutomatically = true
configuration.ignoresViewportScaleLimits = false
configuration.allowsInlineMediaPlayback = true
if #available (iOS 14.0, *) {
     configuration.defaultWebpagePreferences.allowsContentJavaScript = true
     configuration.limitsNavigationsToAppBoundDomains = true
}

webView = WKWebView(frame: .zero, configuration: configuration)
pullControl.attributedTitle = NSMutableAttributedString(string: "Pull to update"). setColor(.black)
pullControl.addTarget (self, action: #selector(pullAction (_ :)), for: .valueChanged)
if #available (iOS 10.0, *) {
    webView.scrollView.refreshControl = pullControl
} else {
    webView.scrollView.addSubview (pullControl)
    webView.scrollView.bounces = true
}
webView.customUserAgent = "XXXXX iOS application"
webView.allowsBackForwardNavigationGestures = true
webView.scrollView.bounces = true
webView.navigationDelegate = self
webView.uiDelegate = self
        
let urlRequest = URLRequest(url: URL (string: SITE_URL)!)
webView.load(urlRequest)

0 Answers0