//Game Controllers void ApplyGameControllersCapability(GameControllersCapability capability) { //update pbxproject _pbxproj.EnableSystemCapability("com.apple.GameControllers.appletvos", true); _pbxproj.AddSystemFramework("GameController.framework", LinkType.Required); //update info.plist var changes = new PListDictionary(); changes.Add("GCSupportsControllerUserInteraction", true); ApplyInfoPlistChanges(changes); if (capability.GameControllers != null && capability.GameControllers.Length > 0) { var controllerChanges = new PListDictionary(); var controllers = new PListArray(); foreach (var c in capability.GameControllers) { var dic = new PListDictionary(); dic.Add("ProfileName", c.ToString()); controllers.Add(dic); } controllerChanges.Add("GCSupportedGameControllers", controllers); ApplyInfoPlistChanges(controllerChanges, true); } }
public GameControllersCapability(GameControllersCapability other) : base(other) { if (other.GameControllers == null || other.GameControllers.Length <= 0) { GameControllers = null; } else { System.Array.Copy(other.GameControllers, GameControllers, other.GameControllers.Length); } }