Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ExtensionKit] Add support for Xcode 14 beta 1 & 2 #15548

Merged
merged 5 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Foundation/NSObject.mac.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public partial class NSObject {
static IntPtr vs = Dlfcn.dlopen (Constants.VideoSubscriberAccountLibrary, 1);
static IntPtr un = Dlfcn.dlopen (Constants.UserNotificationsLibrary, 1);
static IntPtr il = Dlfcn.dlopen (Constants.iTunesLibraryLibrary, 1);
static IntPtr exl = Dlfcn.dlopen (Constants.ExtensionKitLibrary, 1);

#if !NET
[Obsolete ("Use PlatformAssembly for easier code sharing across platforms.")]
Expand Down
73 changes: 73 additions & 0 deletions src/extensionkit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
//
// ExtensionKit.cs: This file describes the API that the generator will produce for ExtensionKit
//
// Copyright 2022 Microsoft Corp. All rights reserved
//

using ObjCRuntime;
using Foundation;

#if MONOMAC
using AppKit;
using UIView = AppKit.NSView;
using UIViewController = AppKit.NSViewController;
#else
using UIKit;
#endif

#if !NET
using NativeHandle = System.IntPtr;
#endif

namespace ExtensionKit {
[Mac (13,0), NoiOS, NoMacCatalyst, NoWatch, NoTV]
[BaseType (typeof (UIViewController))]
interface EXAppExtensionBrowserViewController {
[DesignatedInitializer]
[Export ("initWithNibName:bundle:")]
NativeHandle Constructor ([NullAllowed] string nibNameOrNull, [NullAllowed] NSBundle nibBundleOrNull);
}

interface IEXHostViewControllerDelegate { }

[Mac (13,0), NoiOS, NoMacCatalyst, NoWatch, NoTV]
#if NET
[Protocol, Model]
#else
[Protocol, Model (AutoGeneratedName = true)]
#endif
[BaseType (typeof (NSObject))]
interface EXHostViewControllerDelegate {
[Export ("hostViewControllerDidActivate:")]
void DidActivate (EXHostViewController viewController);

[Export ("hostViewControllerWillDeactivate:error:")]
void WillDeactivate (EXHostViewController viewController, [NullAllowed] NSError error);

[Export ("shouldAcceptXPCConnection:")]
bool ShouldAcceptXpcConnection (NSXpcConnection connection);
}

// @interface EXHostViewController : NSViewController
[Mac (13,0), NoiOS, NoMacCatalyst, NoWatch, NoTV]
[BaseType (typeof(UIViewController))]
interface EXHostViewController
{
[DesignatedInitializer]
[Export ("initWithNibName:bundle:")]
NativeHandle Constructor ([NullAllowed] string nibNameOrNull, [NullAllowed] NSBundle nibBundleOrNull);

[NullAllowed, Wrap ("WeakDelegate")]
IEXHostViewControllerDelegate Delegate { get; set; }

[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }

[Export ("placeholderView", ArgumentSemantic.Strong)]
UIView PlaceholderView { get; set; }

[Export ("makeXPCConnectionWithError:")]
[return: NullAllowed]
NSXpcConnection MakeXpcConnection ([NullAllowed] out NSError error);
}
}
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -2020,6 +2020,7 @@ MACOS_FRAMEWORKS = \
CoreWlan \
EventKit \
ExecutionPolicy \
ExtensionKit \
ExternalAccessory \
FileProvider \
FileProviderUI \
Expand Down

This file was deleted.

8 changes: 0 additions & 8 deletions tests/xtro-sharpie/macOS-ExtensionKit.todo

This file was deleted.

1 change: 1 addition & 0 deletions tools/common/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ public static Frameworks MacFrameworks {
{ "BackgroundAssets", "BackgroundAssets", 13,0 },
{ "HealthKit", "HealthKit", 13,0 },
{ "SharedWithYouCore", "SharedWithYouCore", 13, 0 },
{ "ExtensionKit", "ExtensionKit", 13,0 },
};
}
return mac_frameworks;
Expand Down