diff --git a/src/passkit.cs b/src/passkit.cs index 5df0fa7a9752..56eaed8992b6 100644 --- a/src/passkit.cs +++ b/src/passkit.cs @@ -173,6 +173,48 @@ interface PKPassLibrary { """)] void AddPasses (PKPass [] passes, [NullAllowed] Action completion); + /// The serialized data for each pass to add. + /// The handler to invoke with the result of the add operation. + /// Asks the user whether to add the passes represented by the specified data. + /// If the result is , present a so the user can review the passes. + [iOS (27, 0), MacCatalyst (27, 0), NoMac, NoTV] + [Export ("addPassesWithData:completionHandler:")] + [Async (XmlDocs = """ + The serialized data for each pass to add. + Asynchronously asks the user whether to add the passes represented by the specified data. + A task whose result indicates whether the passes were added, require review, or the operation was canceled. + If the result is , present a so the user can review the passes. + """)] + void AddPasses (NSData [] passesData, Action completionHandler); + + /// The URL of the pass archive to add. + /// The handler to invoke with the result of the add operation. + /// Asks the user whether to add the passes from the specified archive. + /// If the result is , present a so the user can review the passes. + [iOS (27, 0), MacCatalyst (27, 0), NoMac, NoTV] + [Export ("addPassesFromArchiveAtFileURL:completionHandler:")] + [Async (XmlDocs = """ + The URL of the pass archive to add. + Asynchronously asks the user whether to add the passes from the specified archive. + A task whose result indicates whether the passes were added, require review, or the operation was canceled. + If the result is , present a so the user can review the passes. + """)] + void AddPassesFromArchive (NSUrl passesArchiveFileUrl, Action completionHandler); + + /// The serialized pass archive to add. + /// The handler to invoke with the result of the add operation. + /// Asks the user whether to add the passes from the specified archive. + /// If the result is , present a so the user can review the passes. + [iOS (27, 0), MacCatalyst (27, 0), NoMac, NoTV] + [Export ("addPassesFromArchiveWithData:completionHandler:")] + [Async (XmlDocs = """ + The serialized pass archive to add. + Asynchronously asks the user whether to add the passes from the specified archive. + A task whose result indicates whether the passes were added, require review, or the operation was canceled. + If the result is , present a so the user can review the passes. + """)] + void AddPassesFromArchive (NSData passesArchiveData, Action completionHandler); + [Field ("PKPassLibraryDidChangeNotification")] [Notification] NSString DidChangeNotification { get; } @@ -356,6 +398,9 @@ interface PKPassLibrary { [Async (ResultTypeName = "PKSignDataCompletionResult")] [iOS (13, 4)] [MacCatalyst (13, 1)] + [Deprecated (PlatformName.iOS, 26, 0, message: "No longer supported.")] + [Deprecated (PlatformName.MacCatalyst, 26, 0, message: "No longer supported.")] + [Deprecated (PlatformName.MacOSX, 26, 0, message: "No longer supported.")] [Export ("signData:withSecureElementPass:completion:")] void SignData (NSData signData, PKSecureElementPass secureElementPass, PKPassLibrarySignDataCompletionHandler completion); @@ -868,6 +913,11 @@ interface PKPaymentRequest { [Export ("supportedNetworks", ArgumentSemantic.Copy)] NSString [] SupportedNetworks { get; set; } + /// Gets or sets the primary account identifiers that payments should exclude. + [iOS (27, 0), MacCatalyst (27, 0), Mac (27, 0), NoTV] + [Export ("unsupportedPrimaryAccountIdentifiers", ArgumentSemantic.Copy)] + string [] UnsupportedPrimaryAccountIdentifiers { get; set; } + /// Defines the developer's payment-processing capabilities. /// To be added. /// To be added. @@ -1275,6 +1325,27 @@ interface PKAddPassesViewController { [Export ("initWithPasses:")] NativeHandle Constructor (PKPass [] pass); + /// The serialized data for each pass to display. + /// Creates a view controller that displays passes represented by the specified data. + [iOS (27, 0), MacCatalyst (27, 0), NoMac, NoTV] + [Export ("initWithPassesData:")] + [return: NullAllowed] + NativeHandle Constructor (NSData [] passesData); + + /// The URL of the pass archive to display. + /// Creates a view controller that displays passes from the specified archive. + [iOS (27, 0), MacCatalyst (27, 0), NoMac, NoTV] + [Export ("initWithPassesArchiveAtFileURL:")] + [return: NullAllowed] + NativeHandle Constructor (NSUrl passesArchiveFileUrl); + + /// The serialized pass archive to display. + /// Creates a view controller that displays passes from the specified archive. + [iOS (27, 0), MacCatalyst (27, 0), NoMac, NoTV] + [Export ("initWithPassesArchiveData:")] + [return: NullAllowed] + NativeHandle Constructor (NSData passesArchiveData); + [iOS (16, 4), MacCatalyst (16, 4)] [Export ("initWithIssuerData:signature:error:")] NativeHandle Constructor (NSData issuerData, NSData signature, [NullAllowed] out NSError error); @@ -2006,6 +2077,26 @@ interface PKPaymentNetwork { [Mac (26, 4), iOS (26, 4), MacCatalyst (26, 4), NoTV] [Field ("PKPaymentNetworkElCorteIngles")] NSString ElCorteIngles { get; } + + /// Gets the RuPay payment network. + [Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), NoTV] + [Field ("PKPaymentNetworkRuPay")] + NSString RuPay { get; } + + /// Gets the Verve payment network. + [Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), NoTV] + [Field ("PKPaymentNetworkVerve")] + NSString Verve { get; } + + /// Gets the Humo payment network. + [Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), NoTV] + [Field ("PKPaymentNetworkHumo")] + NSString Humo { get; } + + /// Gets the UzCard payment network. + [Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), NoTV] + [Field ("PKPaymentNetworkUzCard")] + NSString UzCard { get; } } /// A button used to activate an Apple Pay payment. Available styles and types are defined by and . @@ -2705,6 +2796,11 @@ interface PKDisbursementRequest { [Export ("supportedNetworks", ArgumentSemantic.Copy)] string [] SupportedNetworks { get; set; } + /// Gets or sets the primary account identifiers that disbursements should exclude. + [iOS (27, 0), Mac (27, 0), NoTV, MacCatalyst (27, 0)] + [Export ("unsupportedPrimaryAccountIdentifiers", ArgumentSemantic.Copy)] + string [] UnsupportedPrimaryAccountIdentifiers { get; set; } + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [Export ("merchantCapabilities", ArgumentSemantic.Assign)] PKMerchantCapability MerchantCapabilities { get; set; } @@ -2770,6 +2866,11 @@ interface PKSecureElementPass { [Export ("passActivationState")] PKSecureElementPassActivationState PassActivationState { get; } + /// Gets a value that indicates whether provisioning can be completed for a pre-provisioned pass. + [iOS (27, 0), MacCatalyst (27, 0), Mac (27, 0), NoTV] + [Export ("provisioningAvailable")] + bool ProvisioningAvailable { [Bind ("isProvisioningAvailable")] get; } + [NullAllowed, Export ("devicePassIdentifier")] string DevicePassIdentifier { get; } @@ -3394,6 +3495,13 @@ interface PKIdentityDocumentDescriptor { [Export ("elements")] PKIdentityElement [] Elements { get; } + /// Gets or sets the issuer identifiers for acceptable document signer certificates. + /// An empty array accepts any document signer certificate. The native API limits this array to 1,000 identifiers and each identifier to 64 bytes; exceeding either limit terminates the app. + [iOS (27, 0), MacCatalyst (27, 0), NoMac, NoTV] + [Abstract] + [Export ("issuerIdentifiers", ArgumentSemantic.Copy)] + NSData [] IssuerIdentifiers { get; set; } + [Abstract] [Export ("intentToStoreForElement:")] [return: NullAllowed] @@ -3522,6 +3630,13 @@ interface PKIdentityElement : NSCopying { [Export ("familyNameElement")] PKIdentityElement FamilyNameElement { get; } + /// Gets the identity element for a person's name. + /// For driver's licenses, this element returns given and family names as separate fields because the mobile driver's license standard does not define a full-name field. + [iOS (27, 0), MacCatalyst (27, 0), NoMac, NoTV] + [Static] + [Export ("nameElement")] + PKIdentityElement NameElement { get; } + [Static] [Export ("portraitElement")] PKIdentityElement PortraitElement { get; } diff --git a/tests/introspection/ApiTypoTest.cs b/tests/introspection/ApiTypoTest.cs index 30a96a177451..8b2eec7249f2 100644 --- a/tests/introspection/ApiTypoTest.cs +++ b/tests/introspection/ApiTypoTest.cs @@ -354,6 +354,7 @@ public ApiTypoTest () { "Hfp", All & ~ApplePlatform.MacOSX }, // Bluetooth Hands-Free Profile { "Hhr", All }, // Apple API abbreviation { "Himyan", All & ~ApplePlatform.TVOS }, // South Arabian script + { "Humo", All & ~ApplePlatform.TVOS }, // Uzbek payment network { "Hermitean", All }, // Apple's spelling of Hermitian in MPSGraph FFT methods { "Hindlegs", All }, // compound word { "Hipass", All }, // high-pass filter diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-PassKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-PassKit.todo deleted file mode 100644 index a5ab15e44978..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-PassKit.todo +++ /dev/null @@ -1,18 +0,0 @@ -!missing-protocol-member! PKIdentityDocumentDescriptor::issuerIdentifiers not found -!missing-protocol-member! PKIdentityDocumentDescriptor::setIssuerIdentifiers: not found -!missing-selector! +PKIdentityElement::nameElement not bound -!missing-selector! PKPaymentRequest::setUnsupportedPrimaryAccountIdentifiers: not bound -!missing-selector! PKPaymentRequest::unsupportedPrimaryAccountIdentifiers not bound -!missing-selector! PKSecureElementPass::isProvisioningAvailable not bound -!missing-field! PKPaymentNetworkHumo not bound -!missing-field! PKPaymentNetworkRuPay not bound -!missing-field! PKPaymentNetworkUzCard not bound -!missing-field! PKPaymentNetworkVerve not bound -!missing-selector! PKAddPassesViewController::initWithPassesArchiveAtFileURL: not bound -!missing-selector! PKAddPassesViewController::initWithPassesArchiveData: not bound -!missing-selector! PKAddPassesViewController::initWithPassesData: not bound -!missing-selector! PKDisbursementRequest::setUnsupportedPrimaryAccountIdentifiers: not bound -!missing-selector! PKDisbursementRequest::unsupportedPrimaryAccountIdentifiers not bound -!missing-selector! PKPassLibrary::addPassesFromArchiveAtFileURL:completionHandler: not bound -!missing-selector! PKPassLibrary::addPassesFromArchiveWithData:completionHandler: not bound -!missing-selector! PKPassLibrary::addPassesWithData:completionHandler: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-PassKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-PassKit.todo deleted file mode 100644 index bc3e926e4c8b..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-PassKit.todo +++ /dev/null @@ -1,19 +0,0 @@ -!missing-protocol-member! PKIdentityDocumentDescriptor::issuerIdentifiers not found -!missing-protocol-member! PKIdentityDocumentDescriptor::setIssuerIdentifiers: not found -!missing-selector! +PKIdentityElement::nameElement not bound -!missing-selector! PKPaymentRequest::setUnsupportedPrimaryAccountIdentifiers: not bound -!missing-selector! PKPaymentRequest::unsupportedPrimaryAccountIdentifiers not bound -!missing-selector! PKSecureElementPass::isProvisioningAvailable not bound -!deprecated-attribute-missing! PKPassLibrary::signData:withSecureElementPass:completion: missing a [Deprecated] attribute -!missing-field! PKPaymentNetworkHumo not bound -!missing-field! PKPaymentNetworkRuPay not bound -!missing-field! PKPaymentNetworkUzCard not bound -!missing-field! PKPaymentNetworkVerve not bound -!missing-selector! PKAddPassesViewController::initWithPassesArchiveAtFileURL: not bound -!missing-selector! PKAddPassesViewController::initWithPassesArchiveData: not bound -!missing-selector! PKAddPassesViewController::initWithPassesData: not bound -!missing-selector! PKDisbursementRequest::setUnsupportedPrimaryAccountIdentifiers: not bound -!missing-selector! PKDisbursementRequest::unsupportedPrimaryAccountIdentifiers not bound -!missing-selector! PKPassLibrary::addPassesFromArchiveAtFileURL:completionHandler: not bound -!missing-selector! PKPassLibrary::addPassesFromArchiveWithData:completionHandler: not bound -!missing-selector! PKPassLibrary::addPassesWithData:completionHandler: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-PassKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-PassKit.todo deleted file mode 100644 index 1498bb710e0a..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-PassKit.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-selector! PKPaymentRequest::setUnsupportedPrimaryAccountIdentifiers: not bound -!missing-selector! PKPaymentRequest::unsupportedPrimaryAccountIdentifiers not bound -!missing-selector! PKSecureElementPass::isProvisioningAvailable not bound -!missing-field! PKPaymentNetworkHumo not bound -!missing-field! PKPaymentNetworkRuPay not bound -!missing-field! PKPaymentNetworkUzCard not bound -!missing-field! PKPaymentNetworkVerve not bound -!missing-selector! PKDisbursementRequest::setUnsupportedPrimaryAccountIdentifiers: not bound -!missing-selector! PKDisbursementRequest::unsupportedPrimaryAccountIdentifiers not bound