exception while mast type to GKPeerPickerConnectionTypeOnline

559 Views Asked by At

I am using GKPeerPickerController , i need to send message using wifi , so iam using following code

         picker = [[GKPeerPickerController alloc] init];

         picker.connectionTypesMask= GKPeerPickerConnectionTypeOnline;
         picker.delegate = self;

but when i use this following error occurs

 Terminating app due to uncaught exception 'GKInvalidArgumentException', reason: 'A     GKPeerPickerController must support GKPeerPickerConnectionTypeNearby at a minimum.'

please help how to solve it?

1

There are 1 best solutions below

0
Tom On

The error message is your answer: according to the docs: "GKPeerPickerConnectionTypeNearby is required to be one of the allowed connection types. An exception is thrown if your application does not include it."