Is it possible to test different iPhone models in simulator with real iPhone8 ?

I have an iPhone 8 and can use it to start a two player match using the Xcode simulator and my Iphone 8 to test my application. This works fine. I now want to test other iPhone models in two player mode.


Issues

I select a different iPhone model in the simulator, start my application in the simulator and then host a 2-player match. I use my iPhone8 to join a 2 player match but Game Center never starts the match. I noticed I can only establish a 2-player match successfully if the simulator is set to "iPhone 8", which is the same model of my physical iPhone I have available for testing


1) Does the simulator only allow testing with the exact same iPhone models only for some reason? Or perhaps there is a setting somewhere which will allow different models in the simultor to be used?


2) I also downloaded the 12.4 simulator for the iPhone8 into Xcode so I could test that my applicaiton works on iOS 12.4, however, I cannot establish a 2-player game using my iPhone8 which is at 13.3 iOS version. Does Game Center allow players of different iOS versions to play together?

Accepted Reply

I think you are asuming things not in evidence. It works on some of your simulators and not on others. Until you show an iPhone 11 connects with the iPhone 11 simulator and not the iPhone 8 simulator you can't conclude any more.


Is there anything else 'on' the iPhone 8 simulator that would help it - like in the keychain or in the settings or in a file that the app once wrote on that one simultaor and not on any other? For example, the log in to the Game Center - is it different on the one simulator that works?

Replies

1) Does the simulator only allow testing with the exact same iPhone models?


I believe it works for all mnodels but the simulator never receives notificaions from Game Center



2)Does Game Center allow players of different iOS versions to play together?


Yes

I am confused by your reply.


>>I believe it works for all models

I know I can select a different model in the simulator and test my game application on the simulator, however, my question is why different models selected on the simulator do not connect to my personal "real" iPhone 8 phone.


>> ...but the simulator never receives notifications from Game Center

I understand sending/receiving Game Center "invites" does not work on the simulator. This is not my issue though.



Here is an example of my issue, hopefully explained more clearly:


1) Select "Iphone 11" in the simulator, then start running my game application in the simulator.


2) In my game running on the simulator, select to "Host" a 2-player game, then select "Play Now" on the Game Center matchmaker View Controller, which is displayed, so it can go off and automatically find one other player to play my game. It is now spinning looking for an available player.


3) On my personal "real" iPhone 8 phone, I start my game application and request to "Join" a 2-player game.


4) The game running on the iPhone 11 simulator and the game running on my iPhone 8 never find each other so the game never starts. Each keeps spinning/looking for a player to add OR a game to join.


** If I perform all of the steps above again but use "iPhone 8" model on the simulator then everything works fine and the simulator and my real iPhone 8 model join together and can play a game successfully.


Basically, if the iPhone model selected in the simulator is set to any model other than "iPhone 8", then it will never automatically find my personal iPhone 8 phone to join to the game. This makes me think that the simulator iPhone model must match the "real" iPhone model being used for testing for Game Center to find players.


Any ideas why the simulator must be set to iPhone 8 model in order to allow it to set up a game with my real iPhone 8 phone?



(EDIT)

In addition, I added the "iPhone 8 (12.4)" simulator to Xcode. When I select "iPhone 8 (12.4)" in the simulator and try to connect to my real iPhone 8 phone (running iOS 13.3), then the simulator and my real iPhone cannot find each other. If I select "iPhone 8 (13.3)" in the simulator then the simulator finds/connects to my real iPhone 8 (with iOS 13.3) phone and starts the game. So it even seems the simulator iOS version has to be the same as the version on the real iPhone being used for testing as well.

I think you are asuming things not in evidence. It works on some of your simulators and not on others. Until you show an iPhone 11 connects with the iPhone 11 simulator and not the iPhone 8 simulator you can't conclude any more.


Is there anything else 'on' the iPhone 8 simulator that would help it - like in the keychain or in the settings or in a file that the app once wrote on that one simultaor and not on any other? For example, the log in to the Game Center - is it different on the one simulator that works?

What do you mean by "keychain"?

My application does not write to any files.

I will need to check the log in information on the simulator. I thought all simulators would use the same login criteria. I was not aware I would need to log into Game Center using the same AppleID account for every single different simulator. I will need to check

Turns out the simulator and my personal real iPhone 8 were using the same Game Center user account. Since both used the same player game account then they would not connect to each other. This makes sense to me now.

Please mark the post above with the correct answer as correct. It states —— Is there anything else 'on' the iPhone 8 simulator that would help it - like in the keychain or in the settings or in a file that the app once wrote on that one simultaor and not on any other? For example, the log in to the Game Center - is it different on the one simulator that works?

I just realized that the simulator was the same Game CEnter account name being used on my real iPHone 8 When I switched the simulator back to my "simulator user" AppleID account then everything worked as expected.