GameKit peer-to-peer connection displayName limited to 40 characters

The title says it all.  I had looked for this information on the internet but not found it.  This is the displayName that you specify in GKSession’s initWithSessionID:displayName:sessionMode: method, and that you retrieve with displayNameForPeer:

- (id)initWithSessionID:(NSString *)sessionID
            displayName:(NSString *)name
            sessionMode:(GKSessionMode)mode

- (NSString *)displayNameForPeer:(NSString *)peerID

You can pass a string of any length into initWithSessionID:displayName:sessionMode:, but it will be truncated to 40 characters when you retrieve it with displayNameForPeer:

Author: Mark

Mark is an American computer programmer living in Switzerland.