Skip to content

Commit

Permalink
[PassKit] Update bindings for Xcode 14 beta 1-5 (#15613)
Browse files Browse the repository at this point in the history
* Starting Xcode14 changes for PassKit Beta 123

* use protocol correctly, ignore conformance

* make suggested changes

* add the abstract to the ignore files

* removing disabledefaultctor

* remove empty todo files

* use manual file for same type constructors and beta changes

* adjust apiselector test

Co-authored-by: TJ Lambert <[email protected]>
Co-authored-by: Manuel de la Pena <[email protected]>
Co-authored-by: Alex Soto <[email protected]>
  • Loading branch information
4 people authored Aug 12, 2022
1 parent 2705912 commit b6ece9e
Show file tree
Hide file tree
Showing 13 changed files with 666 additions and 558 deletions.
73 changes: 72 additions & 1 deletion src/PassKit/PKEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,77 @@ public enum PKAddSecureElementPassErrorCode : long {
UnavailableError,
InvalidConfigurationError,
DeviceNotSupportedError,
DeviceNotReadyError
DeviceNotReadyError,
OSVersionNotSupportedError,
}

[NoWatch, NoTV, NoMac, iOS (16,0), MacCatalyst (16,0)]
[Native]
public enum PKIdentityButtonLabel : long
{
VerifyIdentity = 0,
Verify,
VerifyAge,
Continue,
}

[NoWatch, NoTV, NoMac, iOS (16,0), MacCatalyst (16,0)]
[Native]
public enum PKIdentityButtonStyle : long
{
Black = 0,
Outline,
}

[NoWatch, NoTV, NoMac, iOS (16,0), MacCatalyst (16,0)]
[Native]
[ErrorDomain ("PKIdentityErrorDomain")]
public enum PKIdentityError : long
{
Unknown = 0,
NotSupported = 1,
Cancelled = 2,
NetworkUnavailable = 3,
NoElementsRequested = 4,
RequestAlreadyInProgress = 5,
InvalidNonce = 6,
InvalidElement = 7,
}

[iOS (16,0), Mac (13,0), Watch (9,0), NoTV, MacCatalyst (16,0)]
[Native]
[ErrorDomain ("PKShareSecureElementPassErrorDomain")]
public enum PKShareSecureElementPassErrorCode : long
{
UnknownError,
SetupError,
}

[iOS (16,0), MacCatalyst (16,0), NoWatch, NoTV, NoMac]
[Native]
public enum PKShareSecureElementPassResult : long
{
Canceled,
Shared,
Failed,
}

[iOS (16,0), Mac (13,0), Watch (9,0), NoTV, MacCatalyst (16,0)]
[Native]
public enum PKVehicleConnectionErrorCode : long
{
Unknown = 0,
SessionUnableToStart,
SessionNotActive,
}

[iOS (16,0), Mac (13,0), Watch (9,0), NoTV, MacCatalyst (16,0)]
[Native]
public enum PKVehicleConnectionSessionConnectionState : long
{
Disconnected = 0,
Connected,
Connecting,
FailedToConnect,
}
}
64 changes: 64 additions & 0 deletions src/PassKit/PKShareablePassMetadata.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using System;
using Foundation;
using ObjCRuntime;

#nullable enable

namespace PassKit {

#if !TVOS && !WATCH
public partial class PKShareablePassMetadata
{

#if NET
[SupportedOSPlatform ("ios16.0")]
[SupportedOSPlatform ("macos13.0")]
[SupportedOSPlatform ("maccatalyst16.0")]
[UnsupportedOSPlatform ("tvos")]
#else
[iOS (16,0), Mac (13,0), MacCatalyst (16,0)]
#endif
public enum CardType {
Template = 0,
Configuration = 1,
}

#if NET
[SupportedOSPlatform ("ios16.0")]
[SupportedOSPlatform ("macos13.0")]
[SupportedOSPlatform ("maccatalyst16.0")]
[UnsupportedOSPlatform ("tvos")]
#else
[iOS (16,0), Mac (13,0), MacCatalyst (16,0)]
#endif
public PKShareablePassMetadata (string credentialIdentifier, string sharingInstanceIdentifier, string templateIdentifier, PKShareablePassMetadataPreview preview) :
this (credentialIdentifier, sharingInstanceIdentifier, templateIdentifier, preview, CardType.Template)
{
}

#if NET
[SupportedOSPlatform ("ios16.0")]
[SupportedOSPlatform ("macos13.0")]
[SupportedOSPlatform ("maccatalyst16.0")]
[UnsupportedOSPlatform ("tvos")]
#else
[iOS (16,0), Mac (13,0), MacCatalyst (16,0)]
#endif
public PKShareablePassMetadata (string credentialIdentifier, string sharingInstanceIdentifier, string templateIdentifier, PKShareablePassMetadataPreview preview, CardType cardType) : base (NSObjectFlag.Empty)
{
switch (cardType) {
case CardType.Template:
InitializeHandle (InitWithCardTemplate (credentialIdentifier, sharingInstanceIdentifier, templateIdentifier, preview),
"initWithProvisioningCredentialIdentifier:sharingInstanceIdentifier:cardTemplateIdentifier:preview:");
break;
case CardType.Configuration:
InitializeHandle (InitWithCardConfiguration (credentialIdentifier, sharingInstanceIdentifier, templateIdentifier, preview),
"initWithProvisioningCredentialIdentifier:sharingInstanceIdentifier:cardConfigurationIdentifier:preview:");
break;
default:
throw new ArgumentOutOfRangeException (nameof (cardType));
}
}
}
#endif // !TVOS && !WATCH
}
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,7 @@ PASSKIT_API_SOURCES = \
PASSKIT_SOURCES = \
PassKit/PKCompat.cs \
PassKit/PKPaymentRequest.cs \
PassKit/PKShareablePassMetadata.cs \

# PencilKit
PENCILKIT_API_SOURCEs = \
Expand Down
Loading

5 comments on commit b6ece9e

@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: b6ece9e175c5bc4d96eaab4ffe1a05ded929d90f [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 Mac Catalina (10.15) passed 💻

All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: b6ece9e175c5bc4d96eaab4ffe1a05ded929d90f [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:

  • introspection
  • xammac_tests
  • monotouch-test

Pipeline on Agent
Hash: b6ece9e175c5bc4d96eaab4ffe1a05ded929d90f [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: b6ece9e175c5bc4d96eaab4ffe1a05ded929d90f [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

❌ bcl tests

1 tests failed, 68 tests passed.
  • mscorlib Part 3/tvOS - simulator/Debug: Crashed

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

✅ 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
✅ 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.