Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build failures when importing WebKit, when `-DOS_OBJECT_USE_OBJC=…
…0` is set https://bugs.webkit.org/show_bug.cgi?id=263156 rdar://114438852 Reviewed by Richard Robinson. Before iOS 17 / macOS Sonoma, it was possible to pull in WebKit headers (directly, or through Swift modules) when compiling without ObjC-backed OS objects, by specifying `-DOS_OBJECT_USE_OBJC=0` as a build setting. Some popular libraries and plugins such as the `flutter_inappwebview` plugin (see also: <pichillilorenzo/flutter_inappwebview#1735>) use this. However, after we introduced the following public API in iOS 17: ``` @Property (nullable, nonatomic, copy) NSArray<nw_proxy_config_t> *proxyConfigurations; ``` ...this became impossible, since `nw_proxy_config_t` would be type-defined to an opaque struct pointer in `Network.framework`, which is invalid as a type template argument in an `NSArray`. To fix this, we adopt the same technique used in `Network/NSURLSession+Network.h` and simply expose a generically-typed `NSArray` in the case where `OS_OBJECT_USE_OBJC` is off. * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h: Canonical link: https://commits.webkit.org/269371@main
- Loading branch information