Game Controller

RSS for tag

Support hardware game controllers in your game using Game Controller.

Game Controller Documentation

Posts under Game Controller tag

33 Posts
Sort by:
Post not yet marked as solved
0 Replies
39 Views
I'm currently beta testing my app on TestFlight and some users reported a problem with the DualSense controller. It seems on iOS 15 a long press on the PS Button of the controller is opening the App Library and I don't receive a callback via the valueChangedHandler function. The App library which will be opened looks like this This is how I handle all controller inputs: func handleController(controller: GCController) { controller.extendedGamepad?.valueChangedHandler = { [weak self] (gamepad: GCExtendedGamepad, element: GCControllerElement) in guard let self = self else { return } // no feedback received when performing a long press on the PS button } Is there any way to suppress this behavior? Sony's PS Remote Play app somehow manages to suppress it, but I don't know how, nor can I find anything in Apple's official API documentation.
Posted
by grill2010.
Last updated
.
Post not yet marked as solved
3 Replies
40k Views
Hi all. I just purchased my first iOS game and need to transfer the code to my Apple act. and I cant figure out where/how to locate my apple ID
Posted Last updated
.
Post not yet marked as solved
20 Replies
7k Views
I tried to connect my xbox controller to my MacBook, even though the controller is registered in bluetooth setting, but it doesn't function at all. Have anyone met the same problem and if there's a fix for this problem
Posted
by Wisky_pro.
Last updated
.
Post not yet marked as solved
0 Replies
198 Views
We have an iOS app in Development with in-app purchases that works fine on iOS devices. When running the app on Apple Silicon Macs, the app locks the mouse pointer and renders its own (via GCMouse listener events). When the user selects an in-app item to purchase, the operating system displays the purchase confirmation dialog as expected, however because the pointer is still locked, users are unable to click elements on the dialog or see a pointer. I've tried running setNeedsUpdateOfPrefersPointerLocked and returning false prior to the purchase but the pointer remains locked. Is there a better way to immediately release the lock or ensure the in-app purchase dialog gets the mouse pointer? Thanks.
Posted Last updated
.
Post not yet marked as solved
0 Replies
136 Views
We have a mouseMovedHandler for GCMouse that gets pointer delta updates (when the pointer is locked). This mostly works fine, but on occasion the handler will go through bouts of delayed updates - it will pause for a few seconds before receiving more updates, even though the hardware mouse pointer is being moved. The rest of the app continues to be responsive (ie, the MTKView still pushes frames and the Metal frame rate is still smooth). It appears that something is blocking or delaying the GCMouseMoved events being sent by the System to the mouseMovedHandler. Is there a way we can diagnose this specific delay? Context: IOS App on Apple Silicon M1. APIs: Metal, AVAudio (OGG), GCMouse, GCKeyboard
Posted Last updated
.
Post not yet marked as solved
1 Replies
260 Views
I can connect my Switch Pro controller but It is totally useless. I can connect it to Steam, but any other app doesn't recognize it properly nor recognize its input keys.
Posted
by viniavila.
Last updated
.
Post not yet marked as solved
1 Replies
244 Views
So I got a xbox series x controller a few month ago from a friend of mine who owned a xbox. I recently decided to use it because I really want to play games. So I connected this thing to my Macbook and I found it wierd as the icon of the connection is the generic bluetooth icon rather than the controller icon. Later I fired up F1 2017, and found the controller completely unusable, and the people in Feral sended a plist to me in order to use it. The first time I installed the plist it worked, but the second and the third time didn't work. So I am very curious about this thing. Possible problem: Driver update, because our city is in lockdown I cant do this My macbook's problem. It is a 2020 M1 Macbook 13in MacOS, I am running on 12.3.1 stable. Please help I really need to use my controller to game it is just too painful to not play games in Shanghai now. Edit: Also, the controller does not automatically reconnect if i closed this thing. I need to delete it in Bluetooth and then reconnect it.
Posted Last updated
.
Post not yet marked as solved
0 Replies
262 Views
We're working on a game for iOS, tvOS, and macOS that includes GameKit/GameCenter integration. On tvOS and iOS, when we bring up the Dashboard to access GameCenter with a Gamepad, the controller continues to function properly in that Dashboard. When we do so on macOS, the controller input continues through to the game and the GameCenter Dashboard needs to be interacted with using a mouse. We're able to disable the input falling-through to our game but not being able to use the Dashboard with a controller is an inconsistent experience. Is there a way to fix this? Is this a bug in macOS? All three platforms are using the same exact GKAccessPoint and GKViewController code.
Posted
by 3rdGood.
Last updated
.
Post not yet marked as solved
1 Replies
288 Views
Hi. I've been trying to connect my Playstation controller to my MacBook on the 12.3.1 update since it said it fixed the Bluetooth issue, but it didn't fix anything for me. My controller stays connected for less than 5 seconds and then just disconnects each time. I've tried the safe boot method and it didn't help at all either.
Posted
by destini_g.
Last updated
.
Post not yet marked as solved
0 Replies
308 Views
Recently i have install freefire game in iphone13 mobile and my software is updated with Ios15.4 version Issue is when i try to play my game in Ultra graphics mode it start lagging and heating issue i dont know what happen with my mobile it was running smoothly and after update the software version it start lagging. Pixel also breaking while playing the game
Posted Last updated
.
Post marked as solved
2 Replies
878 Views
I've run into a weird problem trying to use an XBox One Wireless gamepad via the GameController SDK. The controller works fine on two different Macs running Big Sur (and previously worked under Catalina), but is reported as a GCMicroGamepad on an iMac running Mojave. I can't seem to find a list of devices supported by the GameController framework, but I assumed the XBox One controller was a safe bet. Is this device not supported on the older OS?
Posted
by dwn.
Last updated
.
Post not yet marked as solved
2 Replies
440 Views
i have a problem with the GCController framework: I have 2 viewcontrollers, each of them have a button to load the other viewcontroller. First controller code: import Cocoa import GameController class ViewController: NSViewController { @IBAction func abirVc2(_ sender: Any) { if let controller = self.storyboard?.instantiateController(withIdentifier: "ViewController2") as? ViewController2 { self.view.window?.contentViewController = controller } } override func viewDidLoad() { super.viewDidLoad() startWatchingForControllers() // Do any additional setup after loading the view. } override var representedObject: Any? { didSet { // Update the view, if already loaded. } } func startWatchingForControllers() { // Subscribe for the notes let ctr = NotificationCenter.default ctr.addObserver(forName: .GCControllerDidConnect, object: nil, queue: .main) { note in if let ctrl = note.object as? GCController { self.add(ctrl) } } ctr.addObserver(forName: .GCControllerDidDisconnect, object: nil, queue: .main) { note in if let ctrl = note.object as? GCController { self.remove(ctrl) } } // and kick off discovery GCController.startWirelessControllerDiscovery(completionHandler: {}) } func stopWatchingForControllers() { GCController.stopWirelessControllerDiscovery() let ctr = NotificationCenter.default ctr.removeObserver(self, name: .GCControllerDidConnect, object: nil) ctr.removeObserver(self, name: .GCControllerDidDisconnect, object: nil) } func add(_ controller: GCController) { let name = String(describing:controller.vendorName) if let extendedGamepad = controller.extendedGamepad { print("connect extended \(name)") configureDPadButtons(extendedGamepad) //configureDiamondButtons(extendedGamepad) //configureShoulderButtons(extendedGamepad) //configureTriggers(extendedGamepad) return } else if let gamepad = controller.microGamepad { print("connect micro (name)") } else { print("Huh? (name)") } } private func configureDPadButtons(_ gamepad: GCExtendedGamepad) { gamepad.dpad.up.pressedChangedHandler = {(button, value, pressed) in if let controller = self.storyboard?.instantiateController(withIdentifier: "ViewController2") as? ViewController2 { self.view.window?.contentViewController = controller } } gamepad.dpad.down.pressedChangedHandler = {(button, value, pressed) in print("ExtendedGamepad - Down") } gamepad.dpad.left.pressedChangedHandler = {(button, value, pressed) in print("ExtendedGamepad - Left") } gamepad.dpad.right.pressedChangedHandler = {(button, value, pressed) in print("ExtendedGamepad - Right") } } func remove(_ controller: GCController) { } } Second Controller code: import Cocoa class ViewController2: NSViewController { @IBAction func abrirHomeView(_ sender: Any) { if let controller = self.storyboard?.instantiateController(withIdentifier: "HomeView") as? ViewController { self.view.window?.contentViewController = controller } } override func viewDidLoad() { super.viewDidLoad() // Do view setup here. } } On the first controller i press the button to load the second, and then press the second viewcontroller´s button to return to the first one. And it works everytime I press the buttons. Then i use the GamePad´s Up arrow to load viewController 2, it loads correctly, then i use the button on second viewcontroller to return to first controller, ok it works too, but if i use the GamePad´s up button to load the second controller again, it does not do anything... It seems that function that handles the GamePad Up arrow can´t load again the second viewController. I used a simple project to make the test and it´s simple as this, 2 view controllers with one button each... I don´t know what is happening... Thanks in advance
Posted Last updated
.
Post marked as solved
1 Replies
363 Views
Hi, in Swift Playgrounds on my iPad I can see my Xbox controller. I can access its vendorName and it's recognized as an extendedGamepad. However the valueChangedHandler I assigned is never called. I tried both in code/preview mode and when starting the app separately via the play button. Is this not possible in playgrounds or is there something I am missing?
Posted Last updated
.
Post not yet marked as solved
0 Replies
396 Views
Ohai everyone, I am the developer of Stress Ball Breaker, a little breakout game. The three versions are compatible with game controllers, these are required on the tvOS version and remain optional on others versions. The game is available on the App Store for iOS, macOS and tvOS. On Wednesday, I have submitted an update on the App Store. The iOS and macOS versions were quickly accepted, but the tvOS version was suddenly rejected. Previous builds were accepted without any problem. The build was "out of compliance with Guideline 2.1 - Performance - App Completeness", because my app would not respond when user attempts to start game. When I'm testing it on my Apple TV and a game controller connected to it, everything works like a charm. The game controller I am using is a Nimbus Steelseries controller and is MFI-compliant. I have submitted two more builds of the tvOS version with little changes (I have made game controllers working on tvOS simulator). Both builds were rejected too. Now, I am asked to provide additional informations and to "update my plist to include the appropriate External Protocols for the associated MFi accessory. Accessories that use an External Accessory protocol [...] must complete the MFi self-certification process, under the MFi Program". I am also asked to join the MFI program, as if my app was only compatible with a custom game controller of which I would be the manufacturer! My app uses the GameController framework, which is part of the public APIs, so my app can use any Bluetooth gamepad connected to an iPhone, iPad, MacBook or Apple TV. The only thing I have to do is to check the "Extended Gamepad" option on Xcode under the "Signing and Capabilities" tab in my project settings. That's all! I don't know why my app is rejected. I have submitted an appeal, which was closed. The App Store Review requests additional information I can't provide! I don't see any other solution than to cancel my app submission and to remove the tvOS version from the App Store, because future builds will be probably rejected for the same reason. Can someone help me to solve this issue? Thanks in advance! Best regards, Frédéric
Posted
by fferet.
Last updated
.
Post not yet marked as solved
0 Replies
272 Views
after the last update was done every time I'm activating guided access a white line mark is appearing in the middle of the display and touch is not working properly in that particular area.what to do to fix it ?please help.
Posted Last updated
.
Post not yet marked as solved
0 Replies
295 Views
I'm using an Xbox Wireless Controller Model 1708 (listed as a supported device here) on a Late 2012 iMac running Catalina 10.15.7. The controller connects to the system just fine, but I can't interface with it using the Game Controller framework. At boot, I query the list of connected controllers and it's always empty--even if I've already connected my controller to the iMac. I can register for the controller connect/disconnect notifications, and they appear to be working. I receive a connect notification for my Xbox controller shortly after booting (not sure why there's a delay...). The problem is that the GCController object for my Xbox controller returns NIL when I query its extended gamepad profile. How can I query button states if I can't access the extended profile? I can access the deprecated GCGamepad profile as well as the micro gamepad profile, but neither give me access to the full controller's button state. I've tried searching for help and I noticed an unanswered question with the same problem here. How are you all supporting Xbox controllers in your apps? Is it unsupported in Catalina? Cheers! :)
Posted
by bdjones.
Last updated
.
Post not yet marked as solved
0 Replies
377 Views
Brand name: The HID device controller Bluetooth low energy(BLE) HID device is invalid on iOS 13.4 or iOS 13.5, details:Now we find The BLE HID device controller can't work on iOS 13.4 or iOS 13.5, but it's ok on iOS 13.3.1 and below. The HID device controller is a bluetooth low energy(BLE) HID device. It is work well on windows 10 and Android system and iOS 13.3.1 and below, but all are no function on iOS 13.4 or iOS 13.5, please fix it, Thank you! Please open the URL: https://file.qixiongfiles.cn/videodemo.mp4, to watch the video The stylus device BLE HID report descriptor: 0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x01, // USAGE (Digitizer) 0xa1, 0x01, // COLLECTION (Application) 0x85, 0x01, // REPORT_ID (Touch) 0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x20, // USAGE (stylus) 0xa1, 0x02, // COLLECTION (Logical) 0x09, 0x42, // USAGE (Tip Switch) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x32, // USAGE (In Range) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x95, 0x02, // REPORT_COUNT (2) 0x81, 0x01, // INPUT (Cnst,Ary,Abs) 0x75, 0x04, // REPORT_SIZE (4) 0x09, 0x51, // USAGE ( Contact Identifier) 0x25, 0x0f, // LOGICAL_MAXIMUM (255) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x05, 0x01, // USAGE_PAGE (Generic Desk) 0x16, 0x00,0x00, //HID_LogicalMinS (0) 0x26, (0xcA8&0xff), (0xcA8>>8), // LOGICAL_MAXIMUM 0x75, 16, // REPORT_SIZE (16) 0x55, 0x00, // UNIT_EXPONENT (0) 0x65, 0x00, // UNIT (00) 0x09, 0x30, // USAGE (X) 0x36, 0x00,0x00, // PHYSICAL_MINIMUM (0) 0x46, (0xcA8&0xff), (0xcA8>>8), // PHYSICAL_MAXIMUM 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x26, (0x1680&0xff), (0x1680>>8), // LOGICAL_MAXIMUM 0x46, (0x1680&0xff), (0x1680>>8), // PHYSICAL_MAXIMUM 0x09, 0x31, // USAGE (Y) 0x81, 0x02, // INPUT (Data,Var,Abs) 0xc0, // END_COLLECTION 0x85, 0x02, // REPORT_ID (Feature) 0x75, 0x08, // REPORT_SIZE (8) 0x95, 0x01, // REPORT_COUNT (1) 0x15, 0x01, // LOGICAL_MINIMUM (1) 0x25, 0x08, // LOGICAL_MAXIMUM (8) 0x09, 0x55, // USAGE(Maximum Count) 0xB1, 0x02, // FEATURE (Data,Var,Abs) 0xc0, // END_COLLECTION
Posted
by castipo.
Last updated
.
Post not yet marked as solved
2 Replies
558 Views
My new iphone 12 128gb variant is not functioning properly, i experience frame drops while plaing pubg mobile. Is there a way to fix this ?
Posted Last updated
.