Storyboard References Banned UIWebView

ID

swift.storyboard_banned_class_uiwebview

Severity

low

Remediation Complexity

trivial

Remediation Risk

low

Remediation Effort

low

Resource

Reliability

Language

Swift

Tags

deprecated-api, reliability

Description

Reports .storyboard and .xib files that reference UIWebView either through the legacy <webView> Interface Builder element or via an explicit customClass="UIWebView" attribute on a generic view element.

<webView ... />                                <!-- FLAW: legacy IB element -->
<view customClass="UIWebView" ... />           <!-- FLAW: explicit class -->
<wkWebView ... />                              <!-- OK: modern replacement -->

Rationale

Apple deprecated UIWebView in iOS 12. Since 30-Apr-2020 the App Store has rejected new submissions and binary updates that link UIWebView (ITMS-90809). UIWebView also no longer receives security patches and lacks process isolation and out-of-process JIT that WKWebView provides.

The rule flags only the literal UIWebView symbol — subclasses are intentionally not chased, because the App Store linker check operates on the same literal-symbol basis.

Remediation

Replace each <webView> or customClass="UIWebView" reference with <wkWebView> (or a WKWebView subclass). The migration also requires adjusting code-side UIWebViewDelegate usages to the equivalent WKNavigationDelegate / WKUIDelegate APIs.