[webkit-changes] [WebKit/WebKit] 62a6f5: Fix the open source macOS 15.1-and-above build aft...
Abrar Rahman Protyasha
noreply at github.com
Thu Oct 31 19:23:30 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 62a6f504bf7ea2850efb3488395444d8105e6294
https://github.com/WebKit/WebKit/commit/62a6f504bf7ea2850efb3488395444d8105e6294
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2024-10-31 (Thu, 31 Oct 2024)
Changed paths:
M Source/WebKit/Platform/spi/Cocoa/NearFieldSPI.h
M Source/WebKit/UIProcess/WebAuthentication/Mock/MockNfcService.mm
Log Message:
-----------
Fix the open source macOS 15.1-and-above build after 284018 at main
https://bugs.webkit.org/show_bug.cgi?id=282414
rdar://139032978
Reviewed by Wenson Hsieh.
284018 at main fixed internal builds by not calling into
`-[NFReaderSession init]` on certain platform versions, but the fallback
SPI `-initWithUIType:` was not forward declared, so open source builds
calling into said SPI failed. Namely, the build error looks as such:
```
Source/WebKit/UIProcess/WebAuthentication/Mock/MockNfcService.mm:251:70: error: instance method
'-initWithUIType:' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
251 | auto readerSession = adoptNS([allocNFReaderSessionInstance() initWithUIType:NFReaderSessionUINone]);
| ^~~~~~~~~~~~~~
Source/WebKit/UIProcess/WebAuthentication/Mock/MockNfcService.mm:251:85: error: use of undeclared identifier
'NFReaderSessionUINone'
251 | auto readerSession = adoptNS([allocNFReaderSessionInstance() initWithUIType:NFReaderSessionUINone]);
|
```
This patch addresses said build failure by providing appropriate forward
declarations in NearFieldSPI.h, but also opportunistically moves away
unconditionally from `[NFReaderSession init]`, which is marked unavailable
in certain SDK versions, to `[NFReaderSession initWithUIType:]`. This is
safe to do so because the latter is part of the internal SDK on all
supported platform configurations.
* Source/WebKit/Platform/spi/Cocoa/NearFieldSPI.h:
* Source/WebKit/UIProcess/WebAuthentication/Mock/MockNfcService.mm:
(WebKit::MockNfcService::platformStartDiscovery):
(WebKit::MockNfcService::detectTags const):
Canonical link: https://commits.webkit.org/285991@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list