title: Implement Chat Using Game Center Exchanges
body: <p>Apple introduced "Exchanges" for turn-based multiplayer games in iOS 7. One of the possible applications they mentioned was chat functionality. So I've been trying to implement a chat function for my game using exchanges, but exchanges don't really seem appropriate for this. Since Apple mentioned it specifically, I figured maybe my approach is just wrong. </p>
  
  <p>My approach is to send an exchange request for each chat message, with the message text embedded in the request. The other player receives the request, extracts the message and saves it locally and then replies to the exchange in order to complete it. Finally, the player who is about to send a turn needs to check first if there are any completed exchanges and resolve them. Some problems I have with this approach are:</p>
  
  <ul>
  <li>Game Center sends
  notifications when replying to an exchange request. So if player 1
  sends a chat message to player 2, then player 1 will receive a
  notification when player 2 has received the message. There doesn't
  seem to be a way to disable notifications for reply events, so if the application is closed or in the background player 1 will get a Game Center banner.</li>
  <li>In order to resolve an exchange I need to call <code>saveMergedMatchData:withResolvedExchanges:completionHandler:</code> which sends updated game data to Game Center. But in this case the game data remains unchanged, so I'm forced to unneccessarily upload extra data, which might be costly when the player has a bad internet connection.</li>
  <li>Sending a turn to Game Center before resolving all open exchanges results in an error. So all exchanges need to be resolved first. The GKTurnBasedMatch object contains an array "exchanges" that contains all unresolved exchanges, but this data might be outdated if the other player has since replied to one of our exchanges. So I need to download the matchData for the current match again to check for unresolved exchanges before I can make the turn. </li>
  </ul>
  
  <p>Is there a better way to implement a chat function using exchanges?    </p>