Skip to content

Commit 318fb36

Browse files
authored
feat(ios): types for latest 16.2 sdk (NativeScript#10253)
1 parent 02f106a commit 318fb36

14 files changed

Lines changed: 227 additions & 16 deletions

File tree

packages/types-android/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/types-android",
3-
"version": "8.4.0",
3+
"version": "8.5.0",
44
"description": "NativeScript Types for Android.",
55
"homepage": "https://nativescript.org",
66
"repository": {

packages/types-ios/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/types-ios",
3-
"version": "8.4.0",
3+
"version": "8.5.0",
44
"description": "NativeScript Types for iOS.",
55
"homepage": "https://nativescript.org",
66
"repository": {

packages/types-ios/src/lib/ios/ios.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@
120120
/// <reference path="objc-x86_64/objc!PencilKit.d.ts" />
121121
/// <reference path="objc-x86_64/objc!Photos.d.ts" />
122122
/// <reference path="objc-x86_64/objc!PhotosUI.d.ts" />
123-
/// <reference path="objc-x86_64/objc!Pods_iostypingsprj.d.ts" />
124123
/// <reference path="objc-x86_64/objc!ProximityReader.d.ts" />
125124
/// <reference path="objc-x86_64/objc!PushKit.d.ts" />
126125
/// <reference path="objc-x86_64/objc!PushToTalk.d.ts" />

packages/types-ios/src/lib/ios/objc-x86_64/objc!GameKit.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,11 @@ declare class GKMatchmaker extends NSObject {
10671067

10681068
startBrowsingForNearbyPlayersWithReachableHandler(reachableHandler: (p1: string, p2: boolean) => void): void;
10691069

1070+
startGroupActivityWithPlayerHandler(handler: (p1: GKPlayer) => void): void;
1071+
10701072
stopBrowsingForNearbyPlayers(): void;
1073+
1074+
stopGroupActivity(): void;
10711075
}
10721076

10731077
declare class GKMatchmakerViewController extends UINavigationController {

packages/types-ios/src/lib/ios/objc-x86_64/objc!Intents.d.ts

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,62 @@ declare const enum INAmountType {
499499
StatementBalance = 6
500500
}
501501

502+
declare class INAnswerCallIntent extends INIntent {
503+
504+
static alloc(): INAnswerCallIntent; // inherited from NSObject
505+
506+
static new(): INAnswerCallIntent; // inherited from NSObject
507+
508+
constructor(o: { audioRoute: INCallAudioRoute; callIdentifier: string; });
509+
510+
initWithAudioRouteCallIdentifier(audioRoute: INCallAudioRoute, callIdentifier: string): this;
511+
}
512+
513+
interface INAnswerCallIntentHandling extends NSObjectProtocol {
514+
515+
confirmAnswerCallCompletion?(intent: INAnswerCallIntent, completion: (p1: INAnswerCallIntentResponse) => void): void;
516+
517+
handleAnswerCallCompletion(intent: INAnswerCallIntent, completion: (p1: INAnswerCallIntentResponse) => void): void;
518+
}
519+
declare var INAnswerCallIntentHandling: {
520+
521+
prototype: INAnswerCallIntentHandling;
522+
};
523+
524+
declare var INAnswerCallIntentIdentifier: string;
525+
526+
declare class INAnswerCallIntentResponse extends INIntentResponse {
527+
528+
static alloc(): INAnswerCallIntentResponse; // inherited from NSObject
529+
530+
static new(): INAnswerCallIntentResponse; // inherited from NSObject
531+
532+
callRecords: NSArray<INCallRecord>;
533+
534+
readonly code: INAnswerCallIntentResponseCode;
535+
536+
constructor(o: { code: INAnswerCallIntentResponseCode; userActivity: NSUserActivity; });
537+
538+
initWithCodeUserActivity(code: INAnswerCallIntentResponseCode, userActivity: NSUserActivity): this;
539+
}
540+
541+
declare const enum INAnswerCallIntentResponseCode {
542+
543+
Unspecified = 0,
544+
545+
Ready = 1,
546+
547+
ContinueInApp = 2,
548+
549+
InProgress = 3,
550+
551+
Success = 4,
552+
553+
Failure = 5,
554+
555+
FailureRequiringAppLaunch = 6
556+
}
557+
502558
declare class INAppendToNoteIntent extends INIntent {
503559

504560
static alloc(): INAppendToNoteIntent; // inherited from NSObject
@@ -3150,6 +3206,60 @@ declare const enum INGetVisualCodeIntentResponseCode {
31503206
FailureAppConfigurationRequired = 7
31513207
}
31523208

3209+
declare class INHangUpCallIntent extends INIntent {
3210+
3211+
static alloc(): INHangUpCallIntent; // inherited from NSObject
3212+
3213+
static new(): INHangUpCallIntent; // inherited from NSObject
3214+
3215+
constructor(o: { callIdentifier: string; });
3216+
3217+
initWithCallIdentifier(callIdentifier: string): this;
3218+
}
3219+
3220+
interface INHangUpCallIntentHandling extends NSObjectProtocol {
3221+
3222+
confirmHangUpCallCompletion?(intent: INHangUpCallIntent, completion: (p1: INHangUpCallIntentResponse) => void): void;
3223+
3224+
handleHangUpCallCompletion(intent: INHangUpCallIntent, completion: (p1: INHangUpCallIntentResponse) => void): void;
3225+
}
3226+
declare var INHangUpCallIntentHandling: {
3227+
3228+
prototype: INHangUpCallIntentHandling;
3229+
};
3230+
3231+
declare var INHangUpCallIntentIdentifier: string;
3232+
3233+
declare class INHangUpCallIntentResponse extends INIntentResponse {
3234+
3235+
static alloc(): INHangUpCallIntentResponse; // inherited from NSObject
3236+
3237+
static new(): INHangUpCallIntentResponse; // inherited from NSObject
3238+
3239+
readonly code: INHangUpCallIntentResponseCode;
3240+
3241+
constructor(o: { code: INHangUpCallIntentResponseCode; userActivity: NSUserActivity; });
3242+
3243+
initWithCodeUserActivity(code: INHangUpCallIntentResponseCode, userActivity: NSUserActivity): this;
3244+
}
3245+
3246+
declare const enum INHangUpCallIntentResponseCode {
3247+
3248+
Unspecified = 0,
3249+
3250+
Ready = 1,
3251+
3252+
InProgress = 2,
3253+
3254+
Success = 3,
3255+
3256+
Failure = 4,
3257+
3258+
FailureRequiringAppLaunch = 5,
3259+
3260+
FailureNoCallToHangUp = 6
3261+
}
3262+
31533263
declare class INImage extends NSObject implements NSCopying, NSSecureCoding {
31543264

31553265
static alloc(): INImage; // inherited from NSObject

packages/types-ios/src/lib/ios/objc-x86_64/objc!Matter.d.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7250,6 +7250,8 @@ declare class MTRBaseClusterTestCluster extends MTRCluster {
72507250

72517251
static readAttributeVendorIdWithAttributeCacheEndpointQueueCompletionHandler(attributeCacheContainer: MTRAttributeCacheContainer, endpoint: number, queue: NSObject, completionHandler: (p1: number, p2: NSError) => void): void;
72527252

7253+
static readAttributeWriteOnlyInt8uWithAttributeCacheEndpointQueueCompletionHandler(attributeCacheContainer: MTRAttributeCacheContainer, endpoint: number, queue: NSObject, completionHandler: (p1: number, p2: NSError) => void): void;
7254+
72537255
constructor(o: { device: MTRBaseDevice; endpoint: number; queue: NSObject; });
72547256

72557257
initWithDeviceEndpointQueue(device: MTRBaseDevice, endpoint: number, queue: NSObject): this;
@@ -7426,6 +7428,8 @@ declare class MTRBaseClusterTestCluster extends MTRCluster {
74267428

74277429
readAttributeVendorIdWithCompletionHandler(completionHandler: (p1: number, p2: NSError) => void): void;
74287430

7431+
readAttributeWriteOnlyInt8uWithCompletionHandler(completionHandler: (p1: number, p2: NSError) => void): void;
7432+
74297433
simpleStructEchoRequestWithParamsCompletionHandler(params: MTRTestClusterClusterSimpleStructEchoRequestParams, completionHandler: (p1: MTRTestClusterClusterSimpleStructResponseParams, p2: NSError) => void): void;
74307434

74317435
subscribeAttributeAcceptedCommandListWithMinIntervalMaxIntervalParamsSubscriptionEstablishedReportHandler(minInterval: number, maxInterval: number, params: MTRSubscribeParams, subscriptionEstablishedHandler: () => void, reportHandler: (p1: NSArray<any>, p2: NSError) => void): void;
@@ -7600,6 +7604,8 @@ declare class MTRBaseClusterTestCluster extends MTRCluster {
76007604

76017605
subscribeAttributeVendorIdWithMinIntervalMaxIntervalParamsSubscriptionEstablishedReportHandler(minInterval: number, maxInterval: number, params: MTRSubscribeParams, subscriptionEstablishedHandler: () => void, reportHandler: (p1: number, p2: NSError) => void): void;
76027606

7607+
subscribeAttributeWriteOnlyInt8uWithMinIntervalMaxIntervalParamsSubscriptionEstablishedReportHandler(minInterval: number, maxInterval: number, params: MTRSubscribeParams, subscriptionEstablishedHandler: () => void, reportHandler: (p1: number, p2: NSError) => void): void;
7608+
76037609
testAddArgumentsWithParamsCompletionHandler(params: MTRTestClusterClusterTestAddArgumentsParams, completionHandler: (p1: MTRTestClusterClusterTestAddArgumentsResponseParams, p2: NSError) => void): void;
76047610

76057611
testComplexNullableOptionalRequestWithParamsCompletionHandler(params: MTRTestClusterClusterTestComplexNullableOptionalRequestParams, completionHandler: (p1: MTRTestClusterClusterTestComplexNullableOptionalResponseParams, p2: NSError) => void): void;
@@ -7975,6 +7981,10 @@ declare class MTRBaseClusterTestCluster extends MTRCluster {
79757981
writeAttributeVendorIdWithValueCompletionHandler(value: number, completionHandler: (p1: NSError) => void): void;
79767982

79777983
writeAttributeVendorIdWithValueParamsCompletionHandler(value: number, params: MTRWriteParams, completionHandler: (p1: NSError) => void): void;
7984+
7985+
writeAttributeWriteOnlyInt8uWithValueCompletionHandler(value: number, completionHandler: (p1: NSError) => void): void;
7986+
7987+
writeAttributeWriteOnlyInt8uWithValueParamsCompletionHandler(value: number, params: MTRWriteParams, completionHandler: (p1: NSError) => void): void;
79787988
}
79797989

79807990
declare class MTRBaseClusterThermostat extends MTRCluster {
@@ -9470,6 +9480,8 @@ declare class MTRBaseDevice extends NSObject {
94709480

94719481
invokeCommandWithEndpointIdClusterIdCommandIdCommandFieldsTimedInvokeTimeoutClientQueueCompletion(endpointId: number, clusterId: number, commandId: number, commandFields: any, timeoutMs: number, clientQueue: NSObject, completion: (p1: NSArray<NSDictionary<string, any>>, p2: NSError) => void): void;
94729482

9483+
openCommissioningWindowWithSetupPasscodeDiscriminatorDurationQueueCompletion(setupPasscode: number, discriminator: number, duration: number, queue: NSObject, completion: (p1: MTRSetupPayload, p2: NSError) => void): void;
9484+
94739485
readAttributeWithEndpointIdClusterIdAttributeIdParamsClientQueueCompletion(endpointId: number, clusterId: number, attributeId: number, params: MTRReadParams, clientQueue: NSObject, completion: (p1: NSArray<NSDictionary<string, any>>, p2: NSError) => void): void;
94749486

94759487
subscribeAttributeWithEndpointIdClusterIdAttributeIdMinIntervalMaxIntervalParamsClientQueueReportHandlerSubscriptionEstablished(endpointId: number, clusterId: number, attributeId: number, minInterval: number, maxInterval: number, params: MTRSubscribeParams, clientQueue: NSObject, reportHandler: (p1: NSArray<NSDictionary<string, any>>, p2: NSError) => void, subscriptionEstablishedHandler: () => void): void;
@@ -10154,6 +10166,8 @@ declare const enum MTRClusterAttributeIDType {
1015410166

1015510167
PulseWidthModulationAttributeClusterRevisionID = 65533,
1015610168

10169+
DescriptorAttributeDeviceTypeListID = 0,
10170+
1015710171
DescriptorAttributeDeviceListID = 0,
1015810172

1015910173
DescriptorAttributeServerListID = 1,
@@ -12228,6 +12242,8 @@ declare const enum MTRClusterAttributeIDType {
1222812242

1222912243
TestClusterAttributeNullableRangeRestrictedInt16sID = 16425,
1223012244

12245+
TestClusterAttributeWriteOnlyInt8uID = 16426,
12246+
1223112247
TestClusterAttributeGeneratedCommandListID = 65528,
1223212248

1223312249
TestClusterAttributeAcceptedCommandListID = 65529,
@@ -15945,6 +15961,8 @@ declare class MTRClusterTestCluster extends MTRCluster {
1594515961

1594615962
readAttributeVendorIdWithParams(params: MTRReadParams): NSDictionary<string, any>;
1594715963

15964+
readAttributeWriteOnlyInt8uWithParams(params: MTRReadParams): NSDictionary<string, any>;
15965+
1594815966
simpleStructEchoRequestWithParamsExpectedValuesExpectedValueIntervalCompletionHandler(params: MTRTestClusterClusterSimpleStructEchoRequestParams, expectedDataValueDictionaries: NSArray<NSDictionary<string, any>> | NSDictionary<string, any>[], expectedValueIntervalMs: number, completionHandler: (p1: MTRTestClusterClusterSimpleStructResponseParams, p2: NSError) => void): void;
1594915967

1595015968
testAddArgumentsWithParamsExpectedValuesExpectedValueIntervalCompletionHandler(params: MTRTestClusterClusterTestAddArgumentsParams, expectedDataValueDictionaries: NSArray<NSDictionary<string, any>> | NSDictionary<string, any>[], expectedValueIntervalMs: number, completionHandler: (p1: MTRTestClusterClusterTestAddArgumentsResponseParams, p2: NSError) => void): void;
@@ -16322,6 +16340,10 @@ declare class MTRClusterTestCluster extends MTRCluster {
1632216340
writeAttributeVendorIdWithValueExpectedValueInterval(dataValueDictionary: NSDictionary<string, any>, expectedValueIntervalMs: number): void;
1632316341

1632416342
writeAttributeVendorIdWithValueExpectedValueIntervalParams(dataValueDictionary: NSDictionary<string, any>, expectedValueIntervalMs: number, params: MTRWriteParams): void;
16343+
16344+
writeAttributeWriteOnlyInt8uWithValueExpectedValueInterval(dataValueDictionary: NSDictionary<string, any>, expectedValueIntervalMs: number): void;
16345+
16346+
writeAttributeWriteOnlyInt8uWithValueExpectedValueIntervalParams(dataValueDictionary: NSDictionary<string, any>, expectedValueIntervalMs: number, params: MTRWriteParams): void;
1632516347
}
1632616348

1632716349
declare class MTRClusterThermostat extends MTRCluster {
@@ -17805,6 +17827,19 @@ declare class MTRDescriptorClusterDeviceType extends NSObject implements NSCopyi
1780517827
copyWithZone(zone: interop.Pointer | interop.Reference<any>): any;
1780617828
}
1780717829

17830+
declare class MTRDescriptorClusterDeviceTypeStruct extends NSObject implements NSCopying {
17831+
17832+
static alloc(): MTRDescriptorClusterDeviceTypeStruct; // inherited from NSObject
17833+
17834+
static new(): MTRDescriptorClusterDeviceTypeStruct; // inherited from NSObject
17835+
17836+
revision: number;
17837+
17838+
type: number;
17839+
17840+
copyWithZone(zone: interop.Pointer | interop.Reference<any>): any;
17841+
}
17842+
1780817843
declare class MTRDevice extends NSObject {
1780917844

1781017845
static alloc(): MTRDevice; // inherited from NSObject
@@ -17817,6 +17852,8 @@ declare class MTRDevice extends NSObject {
1781717852

1781817853
invokeCommandWithEndpointIDClusterIDCommandIDCommandFieldsExpectedValuesExpectedValueIntervalTimedInvokeTimeoutClientQueueCompletion(endpointID: number, clusterID: number, commandID: number, commandFields: any, expectedValues: NSArray<NSDictionary<string, any>> | NSDictionary<string, any>[], expectedValueInterval: number, timeout: number, clientQueue: NSObject, completion: (p1: NSArray<NSDictionary<string, any>>, p2: NSError) => void): void;
1781917854

17855+
openCommissioningWindowWithSetupPasscodeDiscriminatorDurationQueueCompletion(setupPasscode: number, discriminator: number, duration: number, queue: NSObject, completion: (p1: MTRSetupPayload, p2: NSError) => void): void;
17856+
1782017857
readAttributeWithEndpointIDClusterIDAttributeIDParams(endpointID: number, clusterID: number, attributeID: number, params: MTRReadParams): NSDictionary<string, any>;
1782117858

1782217859
setDelegateQueue(delegate: MTRDeviceDelegate, queue: NSObject): void;
@@ -17898,6 +17935,8 @@ declare class MTRDeviceController extends NSObject {
1789817935

1789917936
setPairingDelegateQueue(delegate: MTRDevicePairingDelegate, queue: NSObject): void;
1790017937

17938+
setupCommissioningSessionWithPayloadNewNodeIDError(payload: MTRSetupPayload, newNodeID: number): boolean;
17939+
1790117940
shutdown(): void;
1790217941

1790317942
stopDevicePairingError(deviceID: number): boolean;
@@ -20875,6 +20914,13 @@ declare class MTRMediaPlaybackClusterStopPlaybackParams extends NSObject impleme
2087520914
copyWithZone(zone: interop.Pointer | interop.Reference<any>): any;
2087620915
}
2087720916

20917+
declare const enum MTRMediaPlaybackFeature {
20918+
20919+
AdvancedSeek = 1,
20920+
20921+
VariableSpeed = 2
20922+
}
20923+
2087820924
declare const enum MTRMediaPlaybackPlaybackState {
2087920925

2088020926
Playing = 0,
@@ -22729,8 +22775,12 @@ declare class MTRSetupPayload extends NSObject implements NSSecureCoding {
2272922775

2273022776
static generateRandomPIN(): number;
2273122777

22778+
static generateRandomSetupPasscode(): number;
22779+
2273222780
static new(): MTRSetupPayload; // inherited from NSObject
2273322781

22782+
static setupPayloadWithOnboardingPayloadError(onboardingPayload: string): MTRSetupPayload;
22783+
2273422784
commissioningFlow: MTRCommissioningFlow;
2273522785

2273622786
discriminator: number;
@@ -22753,13 +22803,19 @@ declare class MTRSetupPayload extends NSObject implements NSSecureCoding {
2275322803

2275422804
constructor(o: { coder: NSCoder; }); // inherited from NSCoding
2275522805

22806+
constructor(o: { setupPasscode: number; discriminator: number; });
22807+
2275622808
encodeWithCoder(coder: NSCoder): void;
2275722809

2275822810
getAllOptionalVendorData(): NSArray<MTROptionalQRCodeInfo>;
2275922811

2276022812
initWithCoder(coder: NSCoder): this;
2276122813

22814+
initWithSetupPasscodeDiscriminator(setupPasscode: number, discriminator: number): this;
22815+
2276222816
manualEntryCode(): string;
22817+
22818+
qrCodeString(): string;
2276322819
}
2276422820

2276522821
declare var MTRSignedIntegerValueType: string;
@@ -22916,6 +22972,19 @@ declare class MTRSwitchClusterSwitchLatchedEvent extends NSObject implements NSC
2291622972
copyWithZone(zone: interop.Pointer | interop.Reference<any>): any;
2291722973
}
2291822974

22975+
declare const enum MTRSwitchFeature {
22976+
22977+
LatchingSwitch = 1,
22978+
22979+
MomentarySwitch = 2,
22980+
22981+
MomentarySwitchRelease = 4,
22982+
22983+
MomentarySwitchLongPress = 8,
22984+
22985+
MomentarySwitchMultiPress = 16
22986+
}
22987+
2291922988
declare class MTRTargetNavigatorClusterNavigateTargetParams extends NSObject implements NSCopying {
2292022989

2292122990
static alloc(): MTRTargetNavigatorClusterNavigateTargetParams; // inherited from NSObject

packages/types-ios/src/lib/ios/objc-x86_64/objc!MetalPerformanceShadersGraph.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,10 @@ declare class MPSGraph extends NSObject {
481481

482482
runWithMTLCommandQueueFeedsTargetTensorsTargetOperations(commandQueue: MTLCommandQueue, feeds: NSDictionary<MPSGraphTensor, MPSGraphTensorData>, targetTensors: NSArray<MPSGraphTensor> | MPSGraphTensor[], targetOperations: NSArray<MPSGraphOperation> | MPSGraphOperation[]): NSDictionary<MPSGraphTensor, MPSGraphTensorData>;
483483

484+
sampleGridWithSourceTensorCoordinateTensorLayoutNormalizeCoordinatesRelativeCoordinatesAlignCornersPaddingModeNearestRoundingModeConstantValueName(source: MPSGraphTensor, coordinates: MPSGraphTensor, layout: MPSGraphTensorNamedDataLayout, normalizeCoordinates: boolean, relativeCoordinates: boolean, alignCorners: boolean, paddingMode: MPSGraphPaddingMode, nearestRoundingMode: MPSGraphResizeNearestRoundingMode, constantValue: number, name: string): MPSGraphTensor;
485+
486+
sampleGridWithSourceTensorCoordinateTensorLayoutNormalizeCoordinatesRelativeCoordinatesAlignCornersPaddingModeSamplingModeConstantValueName(source: MPSGraphTensor, coordinates: MPSGraphTensor, layout: MPSGraphTensorNamedDataLayout, normalizeCoordinates: boolean, relativeCoordinates: boolean, alignCorners: boolean, paddingMode: MPSGraphPaddingMode, samplingMode: MPSGraphResizeMode, constantValue: number, name: string): MPSGraphTensor;
487+
484488
scatterAlongAxisTensorWithDataTensorUpdatesTensorIndicesTensorModeName(axisTensor: MPSGraphTensor, dataTensor: MPSGraphTensor, updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, mode: MPSGraphScatterMode, name: string): MPSGraphTensor;
485489

486490
scatterAlongAxisTensorWithUpdatesTensorIndicesTensorShapeModeName(axisTensor: MPSGraphTensor, updatesTensor: MPSGraphTensor, indicesTensor: MPSGraphTensor, shape: NSArray<number> | number[], mode: MPSGraphScatterMode, name: string): MPSGraphTensor;

packages/types-ios/src/lib/ios/objc-x86_64/objc!NativeScriptUtils.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ declare class NativeScriptUtils extends NSObject {
1111

1212
static getImageDataFormatQuality(image: UIImage, format: string, quality: number): NSData;
1313

14-
static getSystemFontWeightItalicSymbolicTraits(size: number, weight: number, italic: boolean, symbolicTraits: number): UIFont;
14+
static getSystemFontWeightItalicSymbolicTraits(size: number, weight: number, italic: boolean, symbolicTraits: UIFontDescriptorSymbolicTraits): UIFont;
1515

1616
static new(): NativeScriptUtils; // inherited from NSObject
1717

packages/types-ios/src/lib/ios/objc-x86_64/objc!Pods_iostypingsprj.d.ts

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

0 commit comments

Comments
 (0)