Skip to content

Commit

Permalink
[UserNotitications] Add support for Xcode 14 beta 1,2 & 3 (#15544)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel-macaque authored Jul 20, 2022
1 parent 5814da5 commit 3781590
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 36 deletions.
19 changes: 19 additions & 0 deletions src/usernotifications.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public enum UNErrorCode : long {
NotificationInvalidNoContent,
ContentProvidingObjectNotAllowed = 1500,
ContentProvidingInvalid = 1501,
BadgeInputInvalid = 1600,
}

[iOS (10, 0)]
Expand Down Expand Up @@ -131,6 +132,10 @@ public enum UNAuthorizationOptions : ulong {
[iOS (12, 0), TV(12,0), Watch (5,0)]
Provisional = (1 << 6),
[iOS (13,0)][TV (13,0)][Watch (6,0)]
[Deprecated (PlatformName.iOS, 15,0, message: "Announcement is always included.")]
[Deprecated (PlatformName.TvOS, 15,0, message: "Announcement is always included.")]
[Deprecated (PlatformName.WatchOS, 7,0, message: "Announcement is always included.")]
[Deprecated (PlatformName.MacOSX, 15,0, message: "Announcement is always included.")]
Announcement = (1 << 7),
[iOS (15,0), Mac (12,0), MacCatalyst (15,0), TV (15,0), Watch (8,0)]
TimeSensitive = (1 << 8),
Expand Down Expand Up @@ -437,6 +442,11 @@ interface UNNotificationContent : NSCopying, NSMutableCopying, NSSecureCoding {
[Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("relevanceScore")]
double RelevanceScore { get; }

[Watch (9,0), NoTV, Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Export ("filterCriteria")]
[NullAllowed]
string FilterCriteria { get; }
}

[iOS (10, 0)]
Expand Down Expand Up @@ -507,6 +517,10 @@ interface UNMutableNotificationContent {
[iOS (15,0), Mac (12,0), MacCatalyst (15,0), TV (15,0), Watch (8,0)]
[Export ("relevanceScore")]
double RelevanceScore { get; set; }

[TV(16,0), Watch (9,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[NullAllowed, Export ("filterCriteria")]
string FilterCriteria { get; set; }
}

[iOS (10, 0)]
Expand Down Expand Up @@ -882,6 +896,11 @@ interface UNUserNotificationCenter {
[Unavailable (PlatformName.TvOS)]
[Export ("removeAllDeliveredNotifications")]
void RemoveAllDeliveredNotifications ();

[Async]
[TV (16,0), NoWatch, Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Export ("setBadgeCount:withCompletionHandler:")]
void SetBadgeCount (nint newBadgeCount, [NullAllowed] Action<NSError> completionHandler);
}

[iOS (15,0), Mac (12,0), MacCatalyst (15,0), TV (15,0), Watch (8,0)]
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions tests/xtro-sharpie/iOS-UserNotifications.todo

This file was deleted.

1 change: 1 addition & 0 deletions tests/xtro-sharpie/macOS-UserNotifications.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!extra-enum-value! Managed value 128 for UNAuthorizationOptions.Announcement is available for the current platform while the value in the native header is not
6 changes: 0 additions & 6 deletions tests/xtro-sharpie/macOS-UserNotifications.todo

This file was deleted.

1 change: 1 addition & 0 deletions tests/xtro-sharpie/tvOS-UserNotifications.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!extra-enum-value! Managed value 128 for UNAuthorizationOptions.Announcement is available for the current platform while the value in the native header is not
5 changes: 0 additions & 5 deletions tests/xtro-sharpie/tvOS-UserNotifications.todo

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
!extra-enum-value! Managed value 4 for UNNotificationCategoryOptions.HiddenPreviewsShowTitle is available for the current platform while the value in the native header is not
!extra-enum-value! Managed value 8 for UNNotificationCategoryOptions.HiddenPreviewsShowSubtitle is available for the current platform while the value in the native header is not
!missing-selector! UNMutableNotificationContent::filterCriteria not bound
!missing-selector! UNMutableNotificationContent::setFilterCriteria: not bound
!missing-selector! UNNotificationContent::filterCriteria not bound
!missing-enum-value! UNErrorCode native value UNErrorCodeBadgeInputInvalid = 1600 not bound

5 comments on commit 3781590

@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: 37815907232bb5c0fd1434613c6ab4e252693f99 [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)
.NET (No breaking changes)

❗ API diff vs stable (Breaking changes)

Legacy Xamarin (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • iOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • tvOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • watchOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • macOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
.NET (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • iOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • tvOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • MacCatalyst: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • macOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • Microsoft.iOS vs Microsoft.MacCatalyst: vsdrops gist
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

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

Pipeline on Agent
Hash: 37815907232bb5c0fd1434613c6ab4e252693f99 [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: 37815907232bb5c0fd1434613c6ab4e252693f99 [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-061.Monterey'
Hash: 37815907232bb5c0fd1434613c6ab4e252693f99 [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

❌ cecil tests

1 tests failed, 0 tests passed.
  • Cecil-based tests/NUnit: Failed (Execution failed with exit code 3)

Html Report (VSDrops) Download

❌ 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

Successes

✅ bcl: All 69 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
✅ xcframework: All 8 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.