Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ajay009ajay

macrumors newbie
Original poster
Hello,

I have written code to send friend request but whenever I am clicking on "send" button the exc_bad_access error is occurring. Here is the part of code which send the request to another player.

Code:
UIViewController* UVC=[[UIViewController alloc] init];    
    GKFriendRequestComposeViewController *friendRequestViewController = [[GKFriendRequestComposeViewController alloc] init];
    friendRequestViewController.composeViewDelegate = self;
 
    [[[CCDirector sharedDirector] openGLView] addSubview:tempInviteFriendView.view];
    [UVC presentModalViewController:friendRequestViewController animated: YES];
    [UVC release];

My question is how the other player knows the request came and what code I should modify to accept invite and start the game? And also how to know the friend request is accepted by other friend?
 
Last edited by a moderator:
What is the purpose of UVC (a pretty poorly named variable, by the way) in the above code?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.