OMGPOP desires to attract extra consideration to this query.
This can be a comparable drawback to Find out how to convert `VNDocumentCameraViewControllerDelegate` to Swift 6 Concurrency however one warning is new, so this may increasingly require totally different resolution.
I’ve the next code:
@MainActor
ultimate class InterstitialWrapper: NSObject {
…
}
extension InterstitialWrapper: GADFullScreenContentDelegate {
func advert(_ advert: GADFullScreenPresentingAd, didFailToPresentFullScreenContentWithError error: Error) {
}
…
I bought this error:
Principal actor-isolated occasion methodology ‘advert(_:didFailToPresentFullScreenContentWithError:)’ can’t be used to fulfill nonisolated protocol requirement; that is an error within the Swift 6 language mode
Then I take advantage of @preconcurrency tag:
extension InterstitialWrapper: @preconcurrency GADFullScreenContentDelegate
The error turns into:
Non-sendable sort ‘any GADFullScreenPresentingAd’ in parameter of the protocol requirement happy by predominant actor-isolated occasion methodology ‘advert(_:didFailToPresentFullScreenContentWithError:)’ can’t cross actor boundary; that is an error within the Swift 6 language mode
Then I take advantage of @preconcurrency import:
@preconcurrency import GoogleMobileAds
Then I bought:
‘@preconcurrency’ attribute on module ‘GoogleMobileAds’ has no impact
I’ve verified that that is the one file that imports GoogleMobileAds.
Be aware that that is much like Find out how to convert `VNDocumentCameraViewControllerDelegate` to Swift 6 Concurrency, however the warning about Non-sendable sort ‘any GADFullScreenPresentingAd’ is new. Additionally it is not a system framework however a third celebration framework (admob). So I’m creating a brand new query right here in case the answer is totally different.