isMultiplayerGamingRestricted
A Boolean value that indicates whether the player can join multiplayer games.
Declaration
var isMultiplayerGamingRestricted: Bool { get }Mentioned in
Discussion
If this property is true, the local player can’t join multiplayer games. If your game uses a custom multiplayer feature, you should disable it.
On iOS and macOS, the value for this property comes from the Screen Time settings that the system syncs between devices using the same iCloud account. A person can configure multiplayer games to allow playing with everyone, allow with friends only, or prevent multiplayer games with everyone. The isMultiplayerGamingRestricted property reflects whether there are any restrictions. For example, when you configure the setting to friends only, this property returns true for restricted. To change this value when testing your game, see Restrict Game Center section of Use parental controls on your child’s iPhone, iPad, and iPod touch and Change Content Restrictions settings in Screen Time on Mac.
On tvOS, players set this value on the device using the Restrictions menu. This setting is local only; the system doesn’t sync this setting to other devices. To change this value when testing your game, see Restrict access to content on Apple TV.