iphone - Why GKSession always tries to use bluetooth when running on a device and doesn't on simulator? -


i'm trying implement gamekit connection without using gkpeerpickercontroller. need establish wifi connection, not bluetooth.

this how that

self.gamesession = [[gksession alloc] initwithsessionid:@"test" displayname:nil sessionmode:gksessionmodepeer]; self.gamesession.available = yes; self.gamesession.delegate = self; self.gamesession.disconnecttimeout = 0; [self.gamesession setdatareceivehandler:self withcontext:nil]; 

my problem devices try connect on bluetooth. @ least think cause following appears in console

btm: attaching btserver

even if turn bluetooth off tries deal bluetooth, not wifi. - if bluetooth on - devices never see each other if don't use gkpeerpickercontroller. also, simulator never tries bluetooth , able establish wifi connection , find device easily. how make gksession choose wifi connection?

may issue arising jailbroken device,

gksession , gksessiondelegate implementations works both bluetooth , wifi.

these 2 class checks wifi , bluetooth, , choose appropriate transmission medium.

if iphone jailbroken, there might issues bluetooth or wifi while connecting on transmission medium, , possibly prevent work gamekit properly.

and try use

picker.connectiontypesmask = gkpeerpickerconnectiontypeonline 

check condition in delegate methods

if (type == gkpeerpickerconnectiontypeonline) { } 

update :

refer sample code of apple.. https://developer.apple.com/library/ios/#samplecode/gktapper/introduction/intro.html#//apple_ref/doc/uid/dts40010283


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -