Skip to content

Commit 30797f9

Browse files
authored
[PassKit] Update bindings to Xcode 26.0 Beta 1 - 5 (#23574)
1 parent 5e2a1dc commit 30797f9

File tree

6 files changed

+121
-63
lines changed

6 files changed

+121
-63
lines changed

src/PassKit/PKEnums.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,4 +463,27 @@ interface PKMerchantCategoryCodeValues {
463463
[Field ("PKMerchantCategoryCodeNone")]
464464
short None { get; }
465465
}
466+
467+
[iOS (26, 0), Mac (26, 0), MacCatalyst (26, 0), NoTV]
468+
[Native]
469+
public enum PKAddIdentityDocumentType : long {
470+
IdCard,
471+
Mdl,
472+
PhotoId,
473+
}
474+
475+
[iOS (26, 0), Mac (26, 0), MacCatalyst (26, 0), NoTV]
476+
[Native]
477+
public enum PKPassLibraryAuthorizationStatus : long {
478+
NotDetermined = -1,
479+
Denied = 0,
480+
Authorized = 1,
481+
Restricted = 2,
482+
}
483+
484+
[iOS (26, 0), Mac (26, 0), MacCatalyst (26, 0), NoTV]
485+
[Native]
486+
public enum PKPassLibraryCapability : long {
487+
BackgroundAddPasses,
488+
}
466489
}

src/passkit.cs

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,15 @@ interface PKPassLibrary {
366366
[iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0), NoTV]
367367
[Export ("encryptedServiceProviderDataForSecureElementPass:completion:")]
368368
void GetEncryptedServiceProviderData (PKSecureElementPass secureElementPass, Action<NSDictionary, NSError> completion);
369+
370+
[iOS (26, 0), MacCatalyst (26, 0), Mac (26, 0), NoTV]
371+
[Export ("authorizationStatusForCapability:")]
372+
PKPassLibraryAuthorizationStatus GetAuthorizationStatus (PKPassLibraryCapability capability);
373+
374+
[iOS (26, 0), MacCatalyst (26, 0), Mac (26, 0), NoTV]
375+
[Export ("requestAuthorizationForCapability:completion:")]
376+
[Async]
377+
void RequestAuthorization (PKPassLibraryCapability capability, Action<PKPassLibraryAuthorizationStatus> completion);
369378
}
370379

371380
/// <summary>A class whose static members represent keys to be used with the <see cref="PassKit.PKPass.GetLocalizedValue(Foundation.NSString)" /> method.</summary>
@@ -1147,6 +1156,11 @@ interface PKPaymentRequest {
11471156
[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
11481157
[Export ("merchantCategoryCode", ArgumentSemantic.Assign)]
11491158
PKMerchantCategoryCode MerchantCategoryCode { get; set; }
1159+
1160+
[iOS (26, 0), MacCatalyst (26, 0), Mac (26, 0), NoTV]
1161+
[NullAllowed]
1162+
[Export ("attributionIdentifier")]
1163+
string AttributionIdentifier { get; set; }
11501164
}
11511165

11521166
/// <summary>Enumerates fields for a contact.</summary>
@@ -1994,6 +2008,10 @@ interface PKPaymentNetwork {
19942008
[Mac (15, 4), iOS (18, 4), NoTV, MacCatalyst (18, 4)]
19952009
[Field ("PKPaymentNetworkJaywan")]
19962010
NSString Jaywan { get; }
2011+
2012+
[Mac (26, 0), iOS (26, 0), MacCatalyst (26, 0), NoTV]
2013+
[Field ("PKPaymentNetworkMyDebit")]
2014+
NSString MyDebit { get; }
19972015
}
19982016

19992017
/// <summary>A button used to activate an Apple Pay payment. Available styles and types are defined by <see cref="PassKit.PKPaymentButtonStyle" /> and <see cref="PassKit.PKPaymentButtonType" />.</summary>
@@ -2029,6 +2047,15 @@ interface PKPaymentButton {
20292047
[MacCatalyst (13, 1)]
20302048
[Export ("cornerRadius")]
20312049
nfloat CornerRadius { get; set; }
2050+
2051+
[iOS (26, 0), MacCatalyst (26, 0), NoMac, NoTV]
2052+
[Static]
2053+
[Export ("buttonWithType:style:disableCardArt:")]
2054+
PKPaymentButton FromType (PKPaymentButtonType buttonType, PKPaymentButtonStyle buttonStyle, bool disableCardArt);
2055+
2056+
[iOS (26, 0), MacCatalyst (26, 0), NoMac, NoTV]
2057+
[Export ("initWithPaymentButtonType:paymentButtonStyle:disableCardArt:")]
2058+
NativeHandle Constructor (PKPaymentButtonType type, PKPaymentButtonStyle style, bool disableCardArt);
20322059
}
20332060

20342061
/// <summary>A button that adds passes to a Wallet.</summary>
@@ -3552,6 +3579,36 @@ interface PKIdentityElement : NSCopying {
35523579
[Static]
35533580
[Export ("ageThresholdElementWithAge:")]
35543581
PKIdentityElement AgeThresholdElementWithAge (nint age);
3582+
3583+
[iOS (26, 0), MacCatalyst (26, 0), NoMac, NoTV]
3584+
[Static]
3585+
[Export ("heightElement")]
3586+
PKIdentityElement HeightElement { get; }
3587+
3588+
[iOS (26, 0), MacCatalyst (26, 0), NoMac, NoTV]
3589+
[Static]
3590+
[Export ("weightElement")]
3591+
PKIdentityElement WeightElement { get; }
3592+
3593+
[iOS (26, 0), MacCatalyst (26, 0), NoMac, NoTV]
3594+
[Static]
3595+
[Export ("eyeColorElement")]
3596+
PKIdentityElement EyeColorElement { get; }
3597+
3598+
[iOS (26, 0), MacCatalyst (26, 0), NoMac, NoTV]
3599+
[Static]
3600+
[Export ("hairColorElement")]
3601+
PKIdentityElement HairColorElement { get; }
3602+
3603+
[iOS (26, 0), MacCatalyst (26, 0), NoMac, NoTV]
3604+
[Static]
3605+
[Export ("organDonorStatusElement")]
3606+
PKIdentityElement OrganDonorStatusElement { get; }
3607+
3608+
[iOS (26, 0), MacCatalyst (26, 0), NoMac, NoTV]
3609+
[Static]
3610+
[Export ("veteranStatusElement")]
3611+
PKIdentityElement VeteranStatusElement { get; }
35553612
}
35563613

35573614
[NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)]
@@ -3847,6 +3904,14 @@ interface PKIdentityDocumentMetadata {
38473904

38483905
[Export ("serverEnvironmentIdentifier", ArgumentSemantic.Strong)]
38493906
string ServerEnvironmentIdentifier { get; set; }
3907+
3908+
[iOS (26, 0), MacCatalyst (26, 0), Mac (26, 0), NoTV]
3909+
[Export ("issuingCountryCode", ArgumentSemantic.Strong)]
3910+
string IssuingCountryCode { get; }
3911+
3912+
[iOS (26, 0), MacCatalyst (26, 0), Mac (26, 0), NoTV]
3913+
[Export ("documentType")]
3914+
PKAddIdentityDocumentType DocumentType { get; }
38503915
}
38513916

38523917
[NoTV, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)]
@@ -3904,6 +3969,36 @@ interface PKAddPassMetadataPreview {
39043969
string LocalizedDescription { get; }
39053970
}
39063971

3972+
[iOS (26, 0), MacCatalyst (26, 0), Mac (26, 0), NoTV]
3973+
[BaseType (typeof (PKIdentityDocumentMetadata))]
3974+
[DisableDefaultCtor]
3975+
interface PKAddIdentityDocumentMetadata {
3976+
[Export ("initWithProvisioningCredentialIdentifier:sharingInstanceIdentifier:cardTemplateIdentifier:issuingCountryCode:documentType:preview:")]
3977+
NativeHandle Constructor (string credentialIdentifier, string sharingInstanceIdentifier, string templateIdentifier, string issuingCountryCode, PKAddIdentityDocumentType documentType, PKAddPassMetadataPreview preview);
3978+
3979+
[Export ("preview", ArgumentSemantic.Strong)]
3980+
PKAddPassMetadataPreview Preview { get; }
3981+
}
3982+
3983+
[iOS (26, 0), MacCatalyst (26, 0), NoMac, NoTV]
3984+
[BaseType (typeof (NSObject))]
3985+
[DisableDefaultCtor]
3986+
interface PKIdentityAnyOfDescriptor : PKIdentityDocumentDescriptor {
3987+
[Export ("descriptors", ArgumentSemantic.Copy)]
3988+
IPKIdentityDocumentDescriptor [] Descriptors { get; }
3989+
3990+
[Export ("initWithDescriptors:")]
3991+
[DesignatedInitializer]
3992+
NativeHandle Constructor (IPKIdentityDocumentDescriptor [] descriptors);
3993+
}
3994+
3995+
[iOS (26, 0), MacCatalyst (26, 0), NoMac, NoTV]
3996+
[BaseType (typeof (NSObject), Name = "PKIdentityPhotoIDDescriptor")]
3997+
[DisableDefaultCtor]
3998+
interface PKIdentityPhotoIdDescriptor : PKIdentityDocumentDescriptor {
3999+
4000+
}
4001+
39074002
[NoTV, iOS (18, 0), MacCatalyst (18, 0), NoMac]
39084003
[BaseType (typeof (NSObject), Name = "PKIdentityNationalIDCardDescriptor")]
39094004
[DisableDefaultCtor]

tests/introspection/iOSApiProtocolTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ protected override bool Skip (Type type, string protocolName)
452452
case "CPListImageRowItemImageGridElement": // Conformance not in headers
453453
case "CPListImageRowItemRowElement": // Conformance not in headers
454454
case "CPMessageGridItemConfiguration": // Conformance not in headers
455+
case "PKAddIdentityDocumentMetadata": // Conformance not in headers
455456
return true;
456457
}
457458
break;
@@ -662,6 +663,7 @@ protected override bool Skip (Type type, string protocolName)
662663
case "CPListImageRowItemImageGridElement": // Conformance not in headers
663664
case "CPListImageRowItemRowElement": // Conformance not in headers
664665
case "CPMessageGridItemConfiguration": // Conformance not in headers
666+
case "PKAddIdentityDocumentMetadata": // Conformance not in headers
665667
return true;
666668
}
667669
break;
@@ -763,6 +765,7 @@ protected override bool Skip (Type type, string protocolName)
763765
case "SRPhoneUsageReport":
764766
case "SRWristDetection":
765767
case "UIMenuSystemFindElementGroupConfiguration": // conformance not in headers
768+
case "PKAddIdentityDocumentMetadata": // conformance not in headers
766769
return true;
767770
}
768771
break;

tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-PassKit.todo

Lines changed: 0 additions & 25 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/iOS-PassKit.todo

Lines changed: 0 additions & 25 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/macOS-PassKit.todo

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)