Bug 217070

Summary: [watchOS] AVKitSPI build fixes
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: New BugsAssignee: Peng Liu <peng.liu6>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, eric.carlson, jbedard, jlewis3, peng.liu6, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch none

Description Ryan Haddad 2020-09-28 17:19:13 PDT
Since the watchOS simulator bot was updated to the watchOS 7 SDK, the build has been failing with the following errors:

In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm:36:
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/WebAVPlayerController.h:28:
PAL/pal/spi/cocoa/AVKitSPI.h:159:31: error: attempting to use the forward class 'UIView' as superclass of 'AVBackgroundView'
@interface AVBackgroundView : UIView
~~~~~~~~~~~~~~~~~~~~~~~~~~~   ^
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm:36:
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/WebAVPlayerController.h:28:
In file included from PAL/pal/spi/cocoa/AVKitSPI.h:132:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:11:
/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:16:18: note: forward declaration of class here
@class UIWindow, UIView, UIGestureRecognizer, UITouch;
                 ^
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm:36:
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/WebAVPlayerController.h:28:
PAL/pal/spi/cocoa/AVKitSPI.h:174:48: error: attempting to use the forward class 'UIView' as superclass of 'AVPictureInPicturePlayerLayerView'
@interface AVPictureInPicturePlayerLayerView : UIView
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   ^
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm:36:
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/WebAVPlayerController.h:28:
In file included from PAL/pal/spi/cocoa/AVKitSPI.h:132:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:11:
/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:16:18: note: forward declaration of class here
@class UIWindow, UIView, UIGestureRecognizer, UITouch;
                 ^
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm:36:
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/WebAVPlayerController.h:28:
PAL/pal/spi/cocoa/AVKitSPI.h:178:34: error: attempting to use the forward class 'UIView' as superclass of '__AVPlayerLayerView'
@interface __AVPlayerLayerView : UIView
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   ^
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm:36:
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/WebAVPlayerController.h:28:
In file included from PAL/pal/spi/cocoa/AVKitSPI.h:132:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:11:
/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:16:18: note: forward declaration of class here
@class UIWindow, UIView, UIGestureRecognizer, UITouch;
                 ^
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm:36:
In file included from /Volumes/Data/slave/watchos-7-release/build/Source/WebCore/platform/ios/WebAVPlayerController.h:28:
PAL/pal/spi/cocoa/AVKitSPI.h:185:54: error: cannot find protocol declaration for 'AVPlayerViewControllerDelegate'
@protocol AVPlayerViewControllerDelegate_WebKitOnly <AVPlayerViewControllerDelegate>
                                                     ^
PAL/pal/spi/cocoa/AVKitSPI.h:194:31: error: expected a type
- (BOOL)playerViewController:(AVPlayerViewController *)playerViewController shouldExitFullScreenWithReason:(AVPlayerViewControllerExitFullScreenReason)reason;
                              ^
PAL/pal/spi/cocoa/AVKitSPI.h:197:12: error: cannot find interface declaration for 'AVPlayerViewController'; did you mean 'AVPlayerController'?
@interface AVPlayerViewController ()
           ^~~~~~~~~~~~~~~~~~~~~~
           AVPlayerController
PAL/pal/spi/cocoa/AVKitSPI.h:133:12: note: 'AVPlayerController' declared here
@interface AVPlayerController : UIResponder
           ^
6 errors generated.

https://build.webkit.org/builders/Apple-watchOS-7-Release-Build/builds/1/steps/compile-webkit/logs/stdio
Comment 1 Radar WebKit Bug Importer 2020-09-28 17:19:39 PDT
<rdar://problem/69724883>
Comment 2 Jonathan Bedard 2020-09-29 12:24:13 PDT
Created attachment 410030 [details]
Patch
Comment 3 Jonathan Bedard 2020-09-29 12:43:55 PDT
Created attachment 410033 [details]
Patch
Comment 4 Jonathan Bedard 2020-09-29 13:43:56 PDT
Created attachment 410040 [details]
Patch
Comment 5 Jonathan Bedard 2020-09-29 13:44:25 PDT
(In reply to Jonathan Bedard from comment #4)
> Created attachment 410040 [details]
> Patch

We could fix this with SPI, but I think copying the iOS headers is a better approach.
Comment 6 Eric Carlson 2020-09-29 14:00:51 PDT
Comment on attachment 410040 [details]
Patch

rs=me
Comment 7 Jonathan Bedard 2020-09-29 14:10:20 PDT
Created attachment 410047 [details]
Patch
Comment 8 EWS 2020-09-29 14:51:03 PDT
Committed r267764: <https://trac.webkit.org/changeset/267764>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 410047 [details].
Comment 9 Jonathan Bedard 2020-09-29 15:30:25 PDT
Latest trunk builds for watchOS are now successful.