iphone - Bluetooth warnings Xcode? -


i'm trying learn using bluetooth connectivity through making simple peer peer bluetooth chat app. i'm hitting bit of problem i'm new exploring gamekit , bluetooth , hoping can me. think it's formatting issue, wrong. when sending messages between both devices i'd use name of device message coming in uialertview popup displays message. example, 'johnny's iphone says:...'

here's bit of code dealing alertview:

- (void) receivedata:(nsdata *)data          frompeer:(nsstring *)peer         insession:(gksession *)session           context:(void *)context {  //---convert nsdata nsstring--- nsstring* str; str = [[nsstring alloc] initwithdata:data encoding:nsasciistringencoding];  uialertview *alert = [[uialertview alloc] initwithtitle:(@"chat message: %@", peer)                                                 message:str                                                 delegate:self                                        cancelbuttontitle:@"reply"                                        otherbuttontitles:nil]; [alert show]; [alert release];     } 

in above i'm trying use 'peer' set name it's not working. i've tried initialising peer string , passing isn't working either. in both cases string of 9 or 10 numbers whatever message sent displayed below. going wrong , should doing?

use [session displaynameforpeer:peer] return "display name"


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -