createMatch IvalidPlayer Error

When I try to create a new match with a specified player I want to invite(who is not my friend) then game center shows me that the invited player is not valid.

Here is the example:

gn.request(“createMatch”,

                {

                    minPlayers = 2,

                    maxPlaeyrs = 2,

                    playerIDs = {playerIDToRematch},             

                    listener = rematchDataListener

                }

            )

And after that in the rematchDataListener I get message

{“type”:“createMatch”,“name”:“gameNetwork”,“provider”:“gamecenter”,“errorCode”:8,“data”:[],“errorMessage”:“Operation can not be done because the player is invalid.”}

I can assure you that the local player is authenticated, playerIDToRematch is not a random string but a real player in sandbox game center.

iOs 8.1.3, iPhone 6, iPad Air.

And then I got that player as a friend then everything works the way it should.

Thanks, George.

Hi George,

To clarify, you are saying that the error occurs when the player (playerIDToRematch) is not a Game Center friend, but after you become friends with this person, it suddenly works as expected?

Thanks,

Brent

Yes, Brent, exactly like that.

George

Hi George,

Can you briefly research and attempt to confirm that Apple doesn’t put some internal restriction on testing GC non-friends in sandbox mode? Is the ID you’re using for “playerIDToRematch” controlled by you via another account on another device? If so, is GC set to sandbox mode on that device too?

Brent

Hi Brent. 

What I actually have found out is following:

“A development environment does not allow sharing of information about what games are being played. This prevents your testers from revealing the existence of your game to other players.”

That might be the reason why I can’t rematch a non friend player.

George 

Hi George,

To clarify, you are saying that the error occurs when the player (playerIDToRematch) is not a Game Center friend, but after you become friends with this person, it suddenly works as expected?

Thanks,

Brent

Yes, Brent, exactly like that.

George

Hi George,

Can you briefly research and attempt to confirm that Apple doesn’t put some internal restriction on testing GC non-friends in sandbox mode? Is the ID you’re using for “playerIDToRematch” controlled by you via another account on another device? If so, is GC set to sandbox mode on that device too?

Brent

Hi Brent. 

What I actually have found out is following:

“A development environment does not allow sharing of information about what games are being played. This prevents your testers from revealing the existence of your game to other players.”

That might be the reason why I can’t rematch a non friend player.

George