Bug 228174 - javaScriptEnabled is wrongly marked as deprecated for all iOS version in Xcode 13 beta3
Summary: javaScriptEnabled is wrongly marked as deprecated for all iOS version in Xcod...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: Other
Hardware: Mac (Intel) macOS 11
: P2 Major
Assignee: Brady Eidson
Keywords: InRadar
Depends on:
Reported: 2021-07-21 20:33 PDT by honma
Modified: 2021-07-22 15:46 PDT (History)
5 users (show)

See Also:

Test project. (60.44 KB, application/zip)
2021-07-21 20:33 PDT, honma
no flags Details
Patch v1 (1.99 KB, patch)
2021-07-22 13:58 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description honma 2021-07-21 20:33:42 PDT
Created attachment 433986 [details]
Test project.

According to the documentation, this api is available on iOS 8.0 to 14.0, but after specifying the version with @available attribute on xcode beta3, the following warning still appears when compiling. 

>'javaScriptEnabled' is deprecated: Use WKWebPagePreferences.allowsContentJavaScript to disable content JavaScript on a per-navigation basis

This problem does not exist on beta2. It seems to be a bug introduced by beta3. You can build the attached test project with Xcode 13 beta3 to reproduce.
Comment 1 Radar WebKit Bug Importer 2021-07-21 21:59:59 PDT
Comment 2 Alex Christensen 2021-07-22 09:18:55 PDT
This was deprecated in r256715 and the macro was updated in r271813.
I'm curious what the WKPreferences.h looked like after javaScriptEnabled in beta2 and beta3.
Comment 3 Brady Eidson 2021-07-22 13:58:07 PDT
Created attachment 434033 [details]
Patch v1
Comment 4 Brady Eidson 2021-07-22 14:03:19 PDT
https://trac.webkit.org/changeset/279089/webkit is where we think we got this wrong, for reference.
Comment 5 EWS 2021-07-22 15:45:58 PDT
Committed r280202 (239890@main): <https://commits.webkit.org/239890@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434033 [details].