Skip to content

ExtensionKit tvOS xcode14.0 beta1

Israel Soto edited this page Jul 19, 2022 · 3 revisions

#ExtensionKit.framework https://github.com/xamarin/xamarin-macios/pull/15548

diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/EXAppExtensionBrowserViewController.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/EXAppExtensionBrowserViewController.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/EXAppExtensionBrowserViewController.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/EXAppExtensionBrowserViewController.h	2022-06-03 18:07:09.000000000 -0400
@@ -0,0 +1,29 @@
+//
+//  EXAppExtensionBrowserViewController.h
+//  ExtensionKit
+//
+
+#import <ExtensionFoundation/ExtensionFoundation.h>
+#import <Foundation/Foundation.h>
+#import <TargetConditionals.h>
+
+#if TARGET_OS_OSX
+#import <AppKit/AppKit.h>
+#else
+#import <UIKit/UIKit.h>
+#endif // TARGET_OS_OSX
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0))
+API_UNAVAILABLE(ios, watchos, tvos)
+EXTENSIONKIT_EXPORT
+#if TARGET_OS_OSX
+@interface EXAppExtensionBrowserViewController : NSViewController
+@end
+#else
+@interface EXAppExtensionBrowserViewController : UIViewController
+@end
+#endif // TARGET_OS_OSX
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/EXHostViewController.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/EXHostViewController.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/EXHostViewController.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/EXHostViewController.h	2022-06-03 18:07:09.000000000 -0400
@@ -0,0 +1,62 @@
+//
+//  EXHostViewController.h
+//  ExtensionKit
+//
+
+#import <ExtensionFoundation/ExtensionFoundation.h>
+#import <Foundation/Foundation.h>
+
+#if TARGET_OS_OSX
+#import <AppKit/AppKit.h>
+#else
+#import <UIKit/UIKit.h>
+#endif
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol EXHostViewControllerDelegate;
+
+/// A view controller that will host remote UI provided by an extension.
+API_AVAILABLE(macos(13.0))
+API_UNAVAILABLE(ios, watchos, tvos)
+EXTENSIONKIT_EXPORT
+#if TARGET_OS_OSX
+@interface EXHostViewController : NSViewController
+#else
+@interface EXHostViewController : UIViewController
+#endif
+
+/// The view controller's delegate. The delegate will receive callbacks when the hosting state changes.
+@property (weak, nonatomic, nullable) id<EXHostViewControllerDelegate> delegate;
+
+/// A placeholder view that will be displayed while the remote UI is being loaded or if the remote process exits.
+#if TARGET_OS_OSX
+@property (strong, nonatomic) NSView* placeholderView;
+#else
+@property (strong, nonatomic) UIView* placeholderView;
+#endif
+
+/// Returns the connection, the caller is responsible for configuring the connection.
+-(nullable NSXPCConnection*)makeXPCConnectionWithError:(NSError* __nullable*)error;
+
+@end
+
+/// The host view controller delegate will receive callbacks when the host view controller's state changes.
+API_AVAILABLE(macos(13.0))
+API_UNAVAILABLE(ios, watchos, tvos)
+@protocol EXHostViewControllerDelegate <NSObject>
+@optional
+
+/// Called when extension process has launched and the remote scene is connected. After this delegate method has been called the host view controller can establish an XPC connection with the scene in the extension process.
+-(void)hostViewControllerDidActivate:(EXHostViewController*)viewController;
+
+/// Called when the view controller will stop hosting the remote user interface. This can occur when the extension exits or when the view controller's `configuration` property is changed.
+-(void)hostViewControllerWillDeactivate:(EXHostViewController*)viewController error:(nullable NSError *)error;
+
+
+/// Called when the extension attempts to establish and XPC connection back to the host
+-(BOOL)shouldAcceptXPCConnection:(NSXPCConnection*)connection;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/ExtensionKit.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/ExtensionKit.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/ExtensionKit.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ExtensionKit.framework/Headers/ExtensionKit.h	2022-05-24 23:29:06.000000000 -0400
@@ -0,0 +1,15 @@
+//
+//  ExtensionKit.h
+//  ExtensionKit
+//
+
+#ifndef ExtensionKit_h
+#define ExtensionKit_h
+
+#import <Foundation/Foundation.h>
+#import <ExtensionFoundation/ExtensionFoundation.h>
+
+#import <ExtensionKit/EXHostViewController.h>
+#import <ExtensionKit/EXAppExtensionBrowserViewController.h>
+
+#endif /* ExtensionKit_h */
Clone this wiki locally