Repository navigation
Expand file tree
/
Copy pathGameKit.d.ts
More file actions
1477 lines (916 loc) · 53.3 KB
/
Copy pathGameKit.d.ts
File metadata and controls
1477 lines (916 loc) · 53.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/// <reference types="@nativescript/objc-node-api" />
/// <reference path="./Runtime.d.ts" />
/// <reference path="./UIKit.d.ts" />
declare const GKVoiceChatServiceErrorDomain: string;
declare const GKPlayerAuthenticationDidChangeNotificationName: string;
declare const GKExchangeTimeoutDefault: number;
declare const GKTurnTimeoutNone: number;
declare const GKPlayerDidChangeNotificationName: string;
declare const GKPlayerIDNoLongerAvailable: string;
declare const GKSessionErrorDomain: string;
declare const GKExchangeTimeoutNone: number;
declare const GKTurnTimeoutDefault: number;
declare const GKGameSessionErrorDomain: string;
declare const GKErrorDomain: string;
declare const GKVoiceChatPlayerState: {
Connected: 0,
Disconnected: 1,
Speaking: 2,
Silent: 3,
Connecting: 4,
};
declare const GKPeerPickerConnectionType: {
Online: 1,
Nearby: 2,
};
declare const GKVoiceChatServiceError: {
Internal: 32000,
NoRemotePackets: 32001,
UnableToConnect: 32002,
RemoteParticipantHangup: 32003,
InvalidCallID: 32004,
AudioUnavailable: 32005,
UninitializedClient: 32006,
ClientMissingRequiredMethods: 32007,
RemoteParticipantBusy: 32008,
RemoteParticipantCancelled: 32009,
RemoteParticipantResponseInvalid: 32010,
RemoteParticipantDeclinedInvite: 32011,
MethodCurrentlyInvalid: 32012,
NetworkConfiguration: 32013,
UnsupportedRemoteVersion: 32014,
OutOfMemory: 32015,
InvalidParameter: 32016,
};
declare const GKPeerConnectionState: {
Available: 0,
Unavailable: 1,
Connected: 2,
Disconnected: 3,
Connecting: 4,
ConnectedRelay: 5,
};
declare const GKSessionMode: {
Server: 0,
Client: 1,
Peer: 2,
};
declare const GKMatchType: {
PeerToPeer: 0,
Hosted: 1,
TurnBased: 2,
};
declare const GKTurnBasedMatchOutcome: {
None: 0,
Quit: 1,
Won: 2,
Lost: 3,
Tied: 4,
TimeExpired: 5,
First: 6,
Second: 7,
Third: 8,
Fourth: 9,
CustomRange: 16711680,
};
declare const GKGameSessionErrorCode: {
Unknown: 1,
NotAuthenticated: 2,
SessionConflict: 3,
SessionNotShared: 4,
ConnectionCancelledByUser: 5,
ConnectionFailed: 6,
SessionHasMaxConnectedPlayers: 7,
SendDataNotConnected: 8,
SendDataNoRecipients: 9,
SendDataNotReachable: 10,
SendRateLimitReached: 11,
BadContainer: 12,
CloudQuotaExceeded: 13,
NetworkFailure: 14,
CloudDriveDisabled: 15,
InvalidSession: 16,
};
declare const GKChallengeState: {
Invalid: 0,
Pending: 1,
Completed: 2,
Declined: 3,
};
declare const GKAccessPointLocation: {
TopLeading: 0,
TopTrailing: 1,
BottomLeading: 2,
BottomTrailing: 3,
};
declare const GKGameCenterViewControllerState: {
Default: -1,
Leaderboards: 0,
Achievements: 1,
Challenges: 2,
LocalPlayerProfile: 3,
Dashboard: 4,
LocalPlayerFriendsList: 5,
};
declare const GKLeaderboardPlayerScope: {
Global: 0,
FriendsOnly: 1,
};
declare const GKLeaderboardTimeScope: {
Today: 0,
Week: 1,
AllTime: 2,
};
declare const GKPhotoSize: {
Small: 0,
Normal: 1,
};
declare const GKErrorCode: {
Unknown: 1,
Cancelled: 2,
CommunicationsFailure: 3,
UserDenied: 4,
InvalidCredentials: 5,
NotAuthenticated: 6,
AuthenticationInProgress: 7,
InvalidPlayer: 8,
ScoreNotSet: 9,
ParentalControlsBlocked: 10,
PlayerStatusExceedsMaximumLength: 11,
PlayerStatusInvalid: 12,
MatchRequestInvalid: 13,
Underage: 14,
GameUnrecognized: 15,
NotSupported: 16,
InvalidParameter: 17,
UnexpectedConnection: 18,
ChallengeInvalid: 19,
TurnBasedMatchDataTooLarge: 20,
TurnBasedTooManySessions: 21,
TurnBasedInvalidParticipant: 22,
TurnBasedInvalidTurn: 23,
TurnBasedInvalidState: 24,
InvitationsDisabled: 25,
PlayerPhotoFailure: 26,
UbiquityContainerUnavailable: 27,
MatchNotConnected: 28,
GameSessionRequestInvalid: 29,
RestrictedToAutomatch: 30,
APINotAvailable: 31,
NotAuthorized: 32,
ConnectionTimeout: 33,
APIObsolete: 34,
ICloudUnavailable: 35,
LockdownMode: 36,
AppUnlisted: 37,
FriendListDescriptionMissing: 100,
FriendListRestricted: 101,
FriendListDenied: 102,
FriendRequestNotAvailable: 103,
};
declare const GKTransportType: {
Unreliable: 0,
Reliable: 1,
};
declare const GKSendDataMode: {
Reliable: 0,
Unreliable: 1,
};
declare const GKSessionError: {
InvalidParameter: 30500,
PeerNotFound: 30501,
Declined: 30502,
TimedOut: 30503,
Cancelled: 30504,
ConnectionFailed: 30505,
ConnectionClosed: 30506,
DataTooBig: 30507,
NotConnected: 30508,
CannotEnable: 30509,
InProgress: 30510,
Connectivity: 30201,
Transport: 30202,
Internal: 30203,
Unknown: 30204,
System: 30205,
};
declare const GKTurnBasedParticipantStatus: {
Unknown: 0,
Invited: 1,
Declined: 2,
Matching: 3,
Active: 4,
Done: 5,
};
declare const GKInviteRecipientResponse: {
InviteRecipientResponseAccepted: 0,
InviteRecipientResponseDeclined: 1,
InviteRecipientResponseFailed: 2,
InviteRecipientResponseIncompatible: 3,
InviteRecipientResponseUnableToConnect: 4,
InviteRecipientResponseNoAnswer: 5,
InviteeResponseAccepted: 0,
InviteeResponseDeclined: 1,
InviteeResponseFailed: 2,
InviteeResponseIncompatible: 3,
InviteeResponseUnableToConnect: 4,
InviteeResponseNoAnswer: 5,
};
declare const GKConnectionState: {
Not: 0,
GKConnectionStateConnected: 1,
};
declare const GKMatchmakingMode: {
Default: 0,
NearbyOnly: 1,
AutomatchOnly: 2,
InviteOnly: 3,
};
declare const GKLeaderboardType: {
Classic: 0,
Recurring: 1,
};
declare const GKPlayerConnectionState: {
Unknown: 0,
Connected: 1,
Disconnected: 2,
};
declare const GKTurnBasedMatchStatus: {
Unknown: 0,
Open: 1,
Ended: 2,
Matching: 3,
};
declare const GKFriendsAuthorizationStatus: {
NotDetermined: 0,
Restricted: 1,
Denied: 2,
Authorized: 3,
};
declare const GKTurnBasedExchangeStatus: {
Unknown: 0,
Active: 1,
Complete: 2,
Resolved: 3,
Canceled: 4,
};
declare const GKMatchSendDataMode: {
Reliable: 0,
Unreliable: 1,
};
declare interface GKPeerPickerControllerDelegate extends NSObjectProtocol {
peerPickerControllerDidSelectConnectionType?(picker: GKPeerPickerController, type: interop.Enum<typeof GKPeerPickerConnectionType>): void;
peerPickerControllerSessionForConnectionType?(picker: GKPeerPickerController, type: interop.Enum<typeof GKPeerPickerConnectionType>): GKSession;
peerPickerControllerDidConnectPeerToSession?(picker: GKPeerPickerController, peerID: string, session: GKSession): void;
peerPickerControllerDidCancel?(picker: GKPeerPickerController): void;
}
declare class GKPeerPickerControllerDelegate extends NativeObject implements GKPeerPickerControllerDelegate {
}
declare interface GKVoiceChatClient extends NSObjectProtocol {
voiceChatServiceSendDataToParticipantID(voiceChatService: GKVoiceChatService, data: NSData, participantID: string): void;
participantID(): string;
voiceChatServiceSendRealTimeDataToParticipantID?(voiceChatService: GKVoiceChatService, data: NSData, participantID: string): void;
voiceChatServiceDidStartWithParticipantID?(voiceChatService: GKVoiceChatService, participantID: string): void;
voiceChatServiceDidNotStartWithParticipantIDError?(voiceChatService: GKVoiceChatService, participantID: string, error: NSError | null): void;
voiceChatServiceDidStopWithParticipantIDError?(voiceChatService: GKVoiceChatService, participantID: string, error: NSError | null): void;
voiceChatServiceDidReceiveInvitationFromParticipantIDCallID?(voiceChatService: GKVoiceChatService, participantID: string, callID: number): void;
}
declare class GKVoiceChatClient extends NativeObject implements GKVoiceChatClient {
}
declare interface GKSessionDelegate extends NSObjectProtocol {
sessionPeerDidChangeState?(session: GKSession, peerID: string, state: interop.Enum<typeof GKPeerConnectionState>): void;
sessionDidReceiveConnectionRequestFromPeer?(session: GKSession, peerID: string): void;
sessionConnectionWithPeerFailedWithError?(session: GKSession, peerID: string, error: NSError): void;
sessionDidFailWithError?(session: GKSession, error: NSError): void;
}
declare class GKSessionDelegate extends NativeObject implements GKSessionDelegate {
}
declare interface GKMatchmakerViewControllerDelegate extends NSObjectProtocol {
matchmakerViewControllerWasCancelled(viewController: GKMatchmakerViewController): void;
matchmakerViewControllerDidFailWithError(viewController: GKMatchmakerViewController, error: NSError): void;
matchmakerViewControllerDidFindMatch?(viewController: GKMatchmakerViewController, match: GKMatch): void;
matchmakerViewControllerDidFindHostedPlayers?(viewController: GKMatchmakerViewController, players: NSArray<interop.Object> | Array<interop.Object>): void;
matchmakerViewControllerHostedPlayerDidAccept?(viewController: GKMatchmakerViewController, player: GKPlayer): void;
matchmakerViewControllerGetMatchPropertiesForRecipientWithCompletionHandler?(viewController: GKMatchmakerViewController, recipient: GKPlayer, completionHandler: (p1: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object>) => void): void;
matchmakerViewControllerDidFindPlayers?(viewController: GKMatchmakerViewController, playerIDs: NSArray<interop.Object> | Array<interop.Object>): void;
matchmakerViewControllerDidReceiveAcceptFromHostedPlayer?(viewController: GKMatchmakerViewController, playerID: string): void;
}
declare class GKMatchmakerViewControllerDelegate extends NativeObject implements GKMatchmakerViewControllerDelegate {
}
declare interface GKMatchDelegate extends NSObjectProtocol {
matchDidReceiveDataFromRemotePlayer?(match: GKMatch, data: NSData, player: GKPlayer): void;
matchDidReceiveDataForRecipientFromRemotePlayer?(match: GKMatch, data: NSData, recipient: GKPlayer, player: GKPlayer): void;
matchPlayerDidChangeConnectionState?(match: GKMatch, player: GKPlayer, state: interop.Enum<typeof GKPlayerConnectionState>): void;
matchDidFailWithError?(match: GKMatch, error: NSError | null): void;
matchShouldReinviteDisconnectedPlayer?(match: GKMatch, player: GKPlayer): boolean;
matchDidReceiveDataFromPlayer?(match: GKMatch, data: NSData, playerID: string): void;
matchPlayerDidChangeState?(match: GKMatch, playerID: string, state: interop.Enum<typeof GKPlayerConnectionState>): void;
matchShouldReinvitePlayer?(match: GKMatch, playerID: string): boolean;
}
declare class GKMatchDelegate extends NativeObject implements GKMatchDelegate {
}
declare interface GKSavedGameListener extends NSObjectProtocol {
playerDidModifySavedGame?(player: GKPlayer, savedGame: GKSavedGame): void;
playerHasConflictingSavedGames?(player: GKPlayer, savedGames: NSArray<interop.Object> | Array<interop.Object>): void;
}
declare class GKSavedGameListener extends NativeObject implements GKSavedGameListener {
}
declare interface GKInviteEventListener {
playerDidAcceptInvite?(player: GKPlayer, invite: GKInvite): void;
playerDidRequestMatchWithRecipients?(player: GKPlayer, recipientPlayers: NSArray<interop.Object> | Array<interop.Object>): void;
playerDidRequestMatchWithPlayers?(player: GKPlayer, playerIDsToInvite: NSArray<interop.Object> | Array<interop.Object>): void;
}
declare class GKInviteEventListener extends NativeObject implements GKInviteEventListener {
}
declare interface GKTurnBasedEventHandlerDelegate {
handleInviteFromGameCenter(playersToInvite: NSArray<interop.Object> | Array<interop.Object>): void;
handleTurnEventForMatchDidBecomeActive(match: GKTurnBasedMatch, didBecomeActive: boolean): void;
handleTurnEventForMatch?(match: GKTurnBasedMatch): void;
handleMatchEnded?(match: GKTurnBasedMatch): void;
}
declare class GKTurnBasedEventHandlerDelegate extends NativeObject implements GKTurnBasedEventHandlerDelegate {
}
declare interface GKGameSessionEventListener extends NSObjectProtocol {
sessionDidAddPlayer?(session: GKGameSession, player: GKCloudPlayer): void;
sessionDidRemovePlayer?(session: GKGameSession, player: GKCloudPlayer): void;
sessionPlayerDidChangeConnectionState?(session: GKGameSession, player: GKCloudPlayer, newState: interop.Enum<typeof GKConnectionState>): void;
sessionPlayerDidSaveData?(session: GKGameSession, player: GKCloudPlayer, data: NSData): void;
sessionDidReceiveDataFromPlayer?(session: GKGameSession, data: NSData, player: GKCloudPlayer): void;
sessionDidReceiveMessageWithDataFromPlayer?(session: GKGameSession, message: string, data: NSData, player: GKCloudPlayer): void;
}
declare class GKGameSessionEventListener extends NativeObject implements GKGameSessionEventListener {
}
declare interface GKChallengeListener extends NSObjectProtocol {
playerWantsToPlayChallenge?(player: GKPlayer, challenge: GKChallenge): void;
playerDidReceiveChallenge?(player: GKPlayer, challenge: GKChallenge): void;
playerDidCompleteChallengeIssuedByFriend?(player: GKPlayer, challenge: GKChallenge, friendPlayer: GKPlayer): void;
playerIssuedChallengeWasCompletedByFriend?(player: GKPlayer, challenge: GKChallenge, friendPlayer: GKPlayer): void;
}
declare class GKChallengeListener extends NativeObject implements GKChallengeListener {
}
declare interface GKChallengeEventHandlerDelegate extends NSObjectProtocol {
localPlayerDidSelectChallenge?(challenge: GKChallenge): void;
shouldShowBannerForLocallyReceivedChallenge?(challenge: GKChallenge): boolean;
localPlayerDidReceiveChallenge?(challenge: GKChallenge): void;
shouldShowBannerForLocallyCompletedChallenge?(challenge: GKChallenge): boolean;
localPlayerDidCompleteChallenge?(challenge: GKChallenge): void;
shouldShowBannerForRemotelyCompletedChallenge?(challenge: GKChallenge): boolean;
remotePlayerDidCompleteChallenge?(challenge: GKChallenge): void;
}
declare class GKChallengeEventHandlerDelegate extends NativeObject implements GKChallengeEventHandlerDelegate {
}
declare interface GKGameCenterControllerDelegate extends NSObjectProtocol {
gameCenterViewControllerDidFinish(gameCenterViewController: GKGameCenterViewController): void;
}
declare class GKGameCenterControllerDelegate extends NativeObject implements GKGameCenterControllerDelegate {
}
declare interface GKAchievementViewControllerDelegate extends NSObjectProtocol {
achievementViewControllerDidFinish(viewController: GKAchievementViewController): void;
}
declare class GKAchievementViewControllerDelegate extends NativeObject implements GKAchievementViewControllerDelegate {
}
declare interface GKLeaderboardViewControllerDelegate extends NSObjectProtocol {
leaderboardViewControllerDidFinish(viewController: GKLeaderboardViewController): void;
}
declare class GKLeaderboardViewControllerDelegate extends NativeObject implements GKLeaderboardViewControllerDelegate {
}
declare interface GKTurnBasedMatchmakerViewControllerDelegate extends NSObjectProtocol {
turnBasedMatchmakerViewControllerWasCancelled(viewController: GKTurnBasedMatchmakerViewController): void;
turnBasedMatchmakerViewControllerDidFailWithError(viewController: GKTurnBasedMatchmakerViewController, error: NSError): void;
turnBasedMatchmakerViewControllerDidFindMatch?(viewController: GKTurnBasedMatchmakerViewController, match: GKTurnBasedMatch): void;
turnBasedMatchmakerViewControllerPlayerQuitForMatch?(viewController: GKTurnBasedMatchmakerViewController, match: GKTurnBasedMatch): void;
}
declare class GKTurnBasedMatchmakerViewControllerDelegate extends NativeObject implements GKTurnBasedMatchmakerViewControllerDelegate {
}
declare interface GKTurnBasedEventListener {
playerDidRequestMatchWithOtherPlayers?(player: GKPlayer, playersToInvite: NSArray<interop.Object> | Array<interop.Object>): void;
playerReceivedTurnEventForMatchDidBecomeActive?(player: GKPlayer, match: GKTurnBasedMatch, didBecomeActive: boolean): void;
playerMatchEnded?(player: GKPlayer, match: GKTurnBasedMatch): void;
playerReceivedExchangeRequestForMatch?(player: GKPlayer, exchange: GKTurnBasedExchange, match: GKTurnBasedMatch): void;
playerReceivedExchangeCancellationForMatch?(player: GKPlayer, exchange: GKTurnBasedExchange, match: GKTurnBasedMatch): void;
playerReceivedExchangeRepliesForCompletedExchangeForMatch?(player: GKPlayer, replies: NSArray<interop.Object> | Array<interop.Object>, exchange: GKTurnBasedExchange, match: GKTurnBasedMatch): void;
playerWantsToQuitMatch?(player: GKPlayer, match: GKTurnBasedMatch): void;
playerDidRequestMatchWithPlayers?(player: GKPlayer, playerIDsToInvite: NSArray<interop.Object> | Array<interop.Object>): void;
}
declare class GKTurnBasedEventListener extends NativeObject implements GKTurnBasedEventListener {
}
declare interface GKFriendRequestComposeViewControllerDelegate {
friendRequestComposeViewControllerDidFinish(viewController: GKFriendRequestComposeViewController): void;
}
declare class GKFriendRequestComposeViewControllerDelegate extends NativeObject implements GKFriendRequestComposeViewControllerDelegate {
}
declare interface GKLocalPlayerListener extends GKChallengeListener, GKInviteEventListener, GKTurnBasedEventListener, GKSavedGameListener {
}
declare class GKLocalPlayerListener extends NativeObject implements GKLocalPlayerListener {
}
declare class GKVoiceChat extends NSObject {
start(): void;
stop(): void;
setPlayerMuted(player: GKPlayer, isMuted: boolean): void;
playerVoiceChatStateDidChangeHandler: (p1: GKPlayer, p2: interop.Enum<typeof GKVoiceChatPlayerState>) => void;
readonly name: string;
isActive: boolean;
volume: number;
readonly players: NSArray;
static isVoIPAllowed(): boolean;
playerStateUpdateHandler: (p1: string, p2: interop.Enum<typeof GKVoiceChatPlayerState>) => void;
readonly playerIDs: NSArray;
setMuteForPlayer(isMuted: boolean, playerID: string): void;
}
declare class GKTurnBasedMatchmakerViewController extends UINavigationController {
turnBasedMatchmakerDelegate: GKTurnBasedMatchmakerViewControllerDelegate;
showExistingMatches: boolean;
matchmakingMode: interop.Enum<typeof GKMatchmakingMode>;
initWithMatchRequest(request: GKMatchRequest): this;
}
declare class GKPeerPickerController extends NSObject {
connectionTypesMask: interop.Enum<typeof GKPeerPickerConnectionType>;
delegate: GKPeerPickerControllerDelegate;
show(): void;
dismiss(): void;
readonly isVisible: boolean;
}
declare class GKNotificationBanner extends NSObject {
static showBannerWithTitleMessageCompletionHandler(title: string | null, message: string | null, completionHandler: () => void | null): void;
static showBannerWithTitleMessageDurationCompletionHandler(title: string | null, message: string | null, duration: number, completionHandler: () => void | null): void;
}
declare class GKMatchmakerViewController extends UINavigationController {
matchmakerDelegate: GKMatchmakerViewControllerDelegate;
readonly matchRequest: GKMatchRequest;
isHosted: boolean;
matchmakingMode: interop.Enum<typeof GKMatchmakingMode>;
canStartWithMinimumPlayers: boolean;
initWithMatchRequest(request: GKMatchRequest): this;
initWithInvite(invite: GKInvite): this;
addPlayersToMatch(match: GKMatch): void;
setHostedPlayerDidConnect(player: GKPlayer, connected: boolean): void;
defaultInvitationMessage: string;
setHostedPlayerConnected(playerID: string, connected: boolean): void;
setHostedPlayerReady(playerID: string): void;
}
declare class GKMatchmaker extends NSObject {
static sharedMatchmaker(): GKMatchmaker;
matchForInviteCompletionHandler(invite: GKInvite, completionHandler: (p1: GKMatch, p2: NSError) => void | null): void;
findMatchForRequestWithCompletionHandler(request: GKMatchRequest, completionHandler: (p1: GKMatch, p2: NSError) => void | null): void;
findPlayersForHostedRequestWithCompletionHandler(request: GKMatchRequest, completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>, p2: NSError) => void | null): void;
findMatchedPlayersWithCompletionHandler(request: GKMatchRequest, completionHandler: (p1: GKMatchedPlayers, p2: NSError) => void | null): void;
addPlayersToMatchMatchRequestCompletionHandler(match: GKMatch, matchRequest: GKMatchRequest, completionHandler: (p1: NSError) => void | null): void;
cancel(): void;
cancelPendingInviteToPlayer(player: GKPlayer): void;
finishMatchmakingForMatch(match: GKMatch): void;
queryPlayerGroupActivityWithCompletionHandler(playerGroup: number, completionHandler: (p1: number, p2: NSError) => void | null): void;
queryActivityWithCompletionHandler(completionHandler: (p1: number, p2: NSError) => void | null): void;
queryQueueActivityWithCompletionHandler(queueName: string, completionHandler: (p1: number, p2: NSError) => void | null): void;
startBrowsingForNearbyPlayersWithHandler(reachableHandler: (p1: GKPlayer, p2: boolean) => void | null): void;
stopBrowsingForNearbyPlayers(): void;
startGroupActivityWithPlayerHandler(handler: (p1: GKPlayer) => void): void;
stopGroupActivity(): void;
inviteHandler: (p1: GKInvite, p2: NSArray<interop.Object> | Array<interop.Object>) => void | null;
startBrowsingForNearbyPlayersWithReachableHandler(reachableHandler: (p1: string, p2: boolean) => void | null): void;
cancelInviteToPlayer(playerID: string): void;
findPlayersForHostedMatchRequestWithCompletionHandler(request: GKMatchRequest, completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>, p2: NSError) => void | null): void;
}
declare class GKMatchedPlayers extends NSObject {
readonly properties: NSDictionary;
readonly players: NSArray;
readonly playerProperties: NSDictionary;
}
declare class GKTurnBasedExchangeReply extends NSObject {
readonly recipient: GKTurnBasedParticipant;
readonly message: string;
readonly data: NSData;
readonly replyDate: NSDate;
}
declare class GKTurnBasedMatch extends NSObject {
readonly matchID: string;
readonly creationDate: NSDate;
readonly participants: NSArray;
readonly status: interop.Enum<typeof GKTurnBasedMatchStatus>;
readonly currentParticipant: GKTurnBasedParticipant;
readonly matchData: NSData;
setLocalizableMessageWithKeyArguments(key: string, arguments$: NSArray<interop.Object> | Array<interop.Object> | null): void;
message: string;
readonly matchDataMaximumSize: number;
readonly exchanges: NSArray;
readonly activeExchanges: NSArray;
readonly completedExchanges: NSArray;
readonly exchangeDataMaximumSize: number;
readonly exchangeMaxInitiatedExchangesPerPlayer: number;
static findMatchForRequestWithCompletionHandler(request: GKMatchRequest, completionHandler: (p1: GKTurnBasedMatch, p2: NSError) => void | null): void;
static loadMatchesWithCompletionHandler(completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>, p2: NSError) => void | null): void;
static loadMatchWithIDWithCompletionHandler(matchID: string, completionHandler: (p1: GKTurnBasedMatch, p2: NSError) => void | null): void;
rematchWithCompletionHandler(completionHandler: (p1: GKTurnBasedMatch, p2: NSError) => void | null): void;
acceptInviteWithCompletionHandler(completionHandler: (p1: GKTurnBasedMatch, p2: NSError) => void | null): void;
declineInviteWithCompletionHandler(completionHandler: (p1: NSError) => void | null): void;
removeWithCompletionHandler(completionHandler: (p1: NSError) => void | null): void;
loadMatchDataWithCompletionHandler(completionHandler: (p1: NSData, p2: NSError) => void | null): void;
endTurnWithNextParticipantsTurnTimeoutMatchDataCompletionHandler(nextParticipants: NSArray<interop.Object> | Array<interop.Object>, timeout: number, matchData: NSData, completionHandler: (p1: NSError) => void | null): void;
participantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchDataCompletionHandler(matchOutcome: interop.Enum<typeof GKTurnBasedMatchOutcome>, nextParticipants: NSArray<interop.Object> | Array<interop.Object>, timeout: number, matchData: NSData, completionHandler: (p1: NSError) => void | null): void;
participantQuitOutOfTurnWithOutcomeWithCompletionHandler(matchOutcome: interop.Enum<typeof GKTurnBasedMatchOutcome>, completionHandler: (p1: NSError) => void | null): void;
endMatchInTurnWithMatchDataCompletionHandler(matchData: NSData, completionHandler: (p1: NSError) => void | null): void;
endMatchInTurnWithMatchDataScoresAchievementsCompletionHandler(matchData: NSData, scores: NSArray<interop.Object> | Array<interop.Object> | null, achievements: NSArray<interop.Object> | Array<interop.Object> | null, completionHandler: (p1: NSError) => void | null): void;
endMatchInTurnWithMatchDataLeaderboardScoresAchievementsCompletionHandler(matchData: NSData, scores: NSArray<interop.Object> | Array<interop.Object>, achievements: NSArray<interop.Object> | Array<interop.Object>, completionHandler: (p1: NSError) => void | null): void;
saveCurrentTurnWithMatchDataCompletionHandler(matchData: NSData, completionHandler: (p1: NSError) => void | null): void;
saveMergedMatchDataWithResolvedExchangesCompletionHandler(matchData: NSData, exchanges: NSArray<interop.Object> | Array<interop.Object>, completionHandler: (p1: NSError) => void | null): void;
sendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeoutCompletionHandler(participants: NSArray<interop.Object> | Array<interop.Object>, data: NSData, key: string, arguments$: NSArray<interop.Object> | Array<interop.Object>, timeout: number, completionHandler: (p1: GKTurnBasedExchange, p2: NSError) => void | null): void;
sendReminderToParticipantsLocalizableMessageKeyArgumentsCompletionHandler(participants: NSArray<interop.Object> | Array<interop.Object>, key: string, arguments$: NSArray<interop.Object> | Array<interop.Object>, completionHandler: (p1: NSError) => void | null): void;
endTurnWithNextParticipantMatchDataCompletionHandler(nextParticipant: GKTurnBasedParticipant, matchData: NSData, completionHandler: (p1: NSError) => void | null): void;
participantQuitInTurnWithOutcomeNextParticipantMatchDataCompletionHandler(matchOutcome: interop.Enum<typeof GKTurnBasedMatchOutcome>, nextParticipant: GKTurnBasedParticipant, matchData: NSData, completionHandler: (p1: NSError) => void | null): void;
}
declare class GKTurnBasedParticipant extends NSObject {
readonly player: GKPlayer;
readonly lastTurnDate: NSDate;
readonly status: interop.Enum<typeof GKTurnBasedParticipantStatus>;
matchOutcome: interop.Enum<typeof GKTurnBasedMatchOutcome>;
readonly timeoutDate: NSDate;
readonly playerID: string;
}
declare class GKLeaderboardViewController extends GKGameCenterViewController {
timeScope: interop.Enum<typeof GKLeaderboardTimeScope>;
category: string;
leaderboardDelegate: GKLeaderboardViewControllerDelegate;
}
declare class GKGameSession extends NSObject {
readonly identifier: string;
readonly title: string;
readonly owner: GKCloudPlayer;
readonly players: NSArray;
readonly lastModifiedDate: NSDate;
readonly lastModifiedPlayer: GKCloudPlayer;
readonly maxNumberOfConnectedPlayers: number;
readonly badgedPlayers: NSArray;
static createSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler(containerName: string | null, title: string, maxPlayers: number, completionHandler: (p1: GKGameSession, p2: NSError) => void | null): void;
static loadSessionsInContainerCompletionHandler(containerName: string | null, completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>, p2: NSError) => void | null): void;
static loadSessionWithIdentifierCompletionHandler(identifier: string, completionHandler: (p1: GKGameSession, p2: NSError) => void | null): void;
static removeSessionWithIdentifierCompletionHandler(identifier: string, completionHandler: (p1: NSError) => void | null): void;
getShareURLWithCompletionHandler(completionHandler: (p1: NSURL, p2: NSError) => void | null): void;
loadDataWithCompletionHandler(completionHandler: (p1: NSData, p2: NSError) => void | null): void;
saveDataCompletionHandler(data: NSData, completionHandler: (p1: NSData, p2: NSError) => void | null): void;
setConnectionStateCompletionHandler(state: interop.Enum<typeof GKConnectionState>, completionHandler: (p1: NSError) => void | null): void;
playersWithConnectionState(state: interop.Enum<typeof GKConnectionState>): NSArray;
sendDataWithTransportTypeCompletionHandler(data: NSData, transport: interop.Enum<typeof GKTransportType>, completionHandler: (p1: NSError) => void | null): void;
sendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler(key: string, arguments$: NSArray<interop.Object> | Array<interop.Object>, data: NSData | null, players: NSArray<interop.Object> | Array<interop.Object>, badgePlayers: boolean, completionHandler: (p1: NSError) => void | null): void;
clearBadgeForPlayersCompletionHandler(players: NSArray<interop.Object> | Array<interop.Object>, completionHandler: (p1: NSError) => void | null): void;
static addEventListener(listener: NSObject): void;
static removeEventListener(listener: NSObject): void;
}
declare class GKFriendRequestComposeViewController extends UINavigationController {
static maxNumberOfRecipients(): number;
setMessage(message: string | null): void;
addRecipientPlayers(players: NSArray<interop.Object> | Array<interop.Object>): void;
addRecipientsWithPlayerIDs(playerIDs: NSArray<interop.Object> | Array<interop.Object>): void;
addRecipientsWithEmailAddresses(emailAddresses: NSArray<interop.Object> | Array<interop.Object>): void;
composeViewDelegate: GKFriendRequestComposeViewControllerDelegate;
}
declare class GKChallengeEventHandler extends NSObject {
static challengeEventHandler(): GKChallengeEventHandler;
delegate: GKChallengeEventHandlerDelegate;
}
declare class GKChallenge extends NSObject implements NSCoding, NSSecureCoding {
static loadReceivedChallengesWithCompletionHandler(completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>, p2: NSError) => void | null): void;
decline(): void;
readonly issuingPlayer: GKPlayer;
readonly receivingPlayer: GKPlayer;
readonly state: interop.Enum<typeof GKChallengeState>;
readonly issueDate: NSDate;
readonly completionDate: NSDate;
readonly message: string;
readonly issuingPlayerID: string;
readonly receivingPlayerID: string;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
static readonly supportsSecureCoding: boolean;
}
declare class GKLeaderboardScore extends NSObject {
player: GKPlayer;
value: number;
context: number;
leaderboardID: string;
}
declare class GKScore extends NSObject implements NSCoding, NSSecureCoding {
initWithLeaderboardIdentifier(identifier: string): this;
initWithLeaderboardIdentifierPlayer(identifier: string, player: GKPlayer): this;
value: number;
readonly formattedValue: string;
leaderboardIdentifier: string;
context: number;
readonly date: NSDate;
readonly player: GKPlayer;
readonly rank: number;
shouldSetDefaultLeaderboard: boolean;
static reportScoresWithCompletionHandler(scores: NSArray<interop.Object> | Array<interop.Object>, completionHandler: (p1: NSError) => void | null): void;
reportScoreWithCompletionHandler(completionHandler: (p1: NSError) => void | null): void;
initWithCategory(category: string | null): this;
category: string;
initWithLeaderboardIdentifierForPlayer(identifier: string, playerID: string): this;
readonly playerID: string;
static reportScoresWithEligibleChallengesWithCompletionHandler(scores: NSArray<interop.Object> | Array<interop.Object>, challenges: NSArray<interop.Object> | Array<interop.Object>, completionHandler: (p1: NSError) => void | null): void;
static reportLeaderboardScoresWithEligibleChallengesWithCompletionHandler(scores: NSArray<interop.Object> | Array<interop.Object>, challenges: NSArray<interop.Object> | Array<interop.Object>, completionHandler: (p1: NSError) => void | null): void;
issueChallengeToPlayersMessage(playerIDs: NSArray<interop.Object> | Array<interop.Object> | null, message: string | null): void;
challengeComposeControllerWithMessagePlayersCompletionHandler(message: string | null, players: NSArray<interop.Object> | Array<interop.Object> | null, completionHandler: (p1: UIViewController, p2: boolean, p3: NSArray<interop.Object> | Array<interop.Object>) => void | null): UIViewController;
challengeComposeControllerWithMessagePlayersCompletion(message: string | null, players: NSArray<interop.Object> | Array<interop.Object> | null, completionHandler: (p1: UIViewController, p2: boolean, p3: NSArray<interop.Object> | Array<interop.Object>) => void | null): UIViewController;
challengeComposeControllerWithPlayersMessageCompletionHandler(playerIDs: NSArray<interop.Object> | Array<interop.Object> | null, message: string | null, completionHandler: (p1: UIViewController, p2: boolean, p3: NSArray<interop.Object> | Array<interop.Object>) => void | null): UIViewController;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
static readonly supportsSecureCoding: boolean;
}
declare class GKAchievementViewController extends GKGameCenterViewController {
achievementDelegate: GKAchievementViewControllerDelegate;
}
declare class GKAccessPoint extends NSObject {
static readonly shared: GKAccessPoint;
isActive: boolean;
readonly isVisible: boolean;
readonly isPresentingGameCenter: boolean;
showHighlights: boolean;
location: interop.Enum<typeof GKAccessPointLocation>;
readonly frameInScreenCoordinates: CGRect;
parentWindow: UIWindow;
triggerAccessPointWithHandler(handler: () => void): void;
triggerAccessPointWithStateHandler(state: interop.Enum<typeof GKGameCenterViewControllerState>, handler: () => void): void;
triggerAccessPointWithAchievementIDHandler(achievementID: string, handler: () => void | null): void;
triggerAccessPointWithLeaderboardSetIDHandler(leaderboardSetID: string, handler: () => void | null): void;
triggerAccessPointWithLeaderboardIDPlayerScopeTimeScopeHandler(leaderboardID: string, playerScope: interop.Enum<typeof GKLeaderboardPlayerScope>, timeScope: interop.Enum<typeof GKLeaderboardTimeScope>, handler: () => void | null): void;
triggerAccessPointWithPlayerHandler(player: GKPlayer, handler: () => void | null): void;
}
declare class GKLeaderboard extends NSObject {
readonly title: string;
readonly groupIdentifier: string;
readonly baseLeaderboardID: string;
readonly type: interop.Enum<typeof GKLeaderboardType>;
readonly startDate: NSDate;
readonly nextStartDate: NSDate;
readonly duration: number;
static loadLeaderboardsWithIDsCompletionHandler(leaderboardIDs: NSArray<interop.Object> | Array<interop.Object> | null, completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>, p2: NSError) => void | null): void;
loadPreviousOccurrenceWithCompletionHandler(completionHandler: (p1: GKLeaderboard, p2: NSError) => void | null): void;
static submitScoreContextPlayerLeaderboardIDsCompletionHandler(score: number, context: number, player: GKPlayer, leaderboardIDs: NSArray<interop.Object> | Array<interop.Object>, completionHandler: (p1: NSError) => void | null): void;
submitScoreContextPlayerCompletionHandler(score: number, context: number, player: GKPlayer, completionHandler: (p1: NSError) => void | null): void;
loadEntriesForPlayerScopeTimeScopeRangeCompletionHandler(playerScope: interop.Enum<typeof GKLeaderboardPlayerScope>, timeScope: interop.Enum<typeof GKLeaderboardTimeScope>, range: _NSRange, completionHandler: (p1: GKLeaderboardEntry, p2: NSArray<interop.Object> | Array<interop.Object>, p3: number, p4: NSError) => void | null): void;
loadEntriesForPlayersTimeScopeCompletionHandler(players: NSArray<interop.Object> | Array<interop.Object>, timeScope: interop.Enum<typeof GKLeaderboardTimeScope>, completionHandler: (p1: GKLeaderboardEntry, p2: NSArray<interop.Object> | Array<interop.Object>, p3: NSError) => void | null): void;
category: string;
initWithPlayerIDs(playerIDs: NSArray<interop.Object> | Array<interop.Object> | null): this;
static loadCategoriesWithCompletionHandler(completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>, p2: NSArray<interop.Object> | Array<interop.Object>, p3: NSError) => void | null): void;
static setDefaultLeaderboardWithCompletionHandler(leaderboardIdentifier: string | null, completionHandler: (p1: NSError) => void | null): void;
timeScope: interop.Enum<typeof GKLeaderboardTimeScope>;
playerScope: interop.Enum<typeof GKLeaderboardPlayerScope>;
identifier: string;