game center sending friend request and invite alerts

Discussion in 'iOS Programming' started by ajay009ajay, Dec 7, 2011.

  1. ajay009ajay, Dec 7, 2011
    Last edited by a moderator: Dec 7, 2011

    ajay009ajay macrumors newbie

    Joined:
    Dec 7, 2011
    #1
    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?
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    What is the purpose of UVC (a pretty poorly named variable, by the way) in the above code?
     

Share This Page