Skip to content

Commit

Permalink
[ExtensionKit] Add support for Xcode 14 beta 1 & 2 (#15548)
Browse files Browse the repository at this point in the history
  • Loading branch information
Israel Soto authored Sep 6, 2022
1 parent 2f6b916 commit a869ea0
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 16 deletions.
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

5 comments on commit a869ea0

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS Mac Catalina (10.15) passed 💻

All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: a869ea01c0eed6f1d733d357f8dc7c9b552dd9a4 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS (no change detected)
  • macOS: vsdrops gist (No breaking changes)
.NET (No breaking changes)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: vsdrops gist (No breaking changes)

✅ API diff vs stable

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: a869ea01c0eed6f1d733d357f8dc7c9b552dd9a4 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

Failed tests are:

  • monotouch-test

Pipeline on Agent
Hash: a869ea01c0eed6f1d733d357f8dc7c9b552dd9a4 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 [CI Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-063.Monterey'
Hash: a869ea01c0eed6f1d733d357f8dc7c9b552dd9a4 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

0 tests crashed, 2 tests failed, 226 tests passed.

Failures

❌ introspection tests

1 tests failed, 12 tests passed.
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 6.0): Crashed Known issue: HE0038)

Html Report (VSDrops) Download

❌ xcframework tests

1 tests failed, 7 tests passed.
  • xcframework-test/watchOS 32-bits - simulator/Debug: TimedOut

Html Report (VSDrops) Download

Successes

✅ bcl: All 69 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 23 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [CI build]

Please sign in to comment.