Game Controller

RSS for tag

Support hardware game controllers in your game using Game Controller.

Game Controller Documentation

Posts under Game Controller tag

41 Posts
Sort by:
Post not yet marked as solved
1 Replies
551 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
1 Replies
95 Views
Il mio gamepad con cavo usb non funziona più. Ha sempre funzionato su Steam, ma ora non viene più rilevato come controller. Non viene rilevato come controller nemmeno su giochi scaricati dall'apple store. Ho provato diversi gamepad e il problema è sempre lo stesso. Se vado su "informazioni di sistema" viene rilevata come periferica usb. Se faccio il test su https://gamepad-tester.com/ funziona tutto correttamente, ma continua a non essere rilevato come controller dai giochi. Come posso sistemare il problema? Fino ad un mese fa funzionava tutto perfettamente. Attualmente ho macos Monterey 12.6.1 Grazie
Posted
by Marab.
Last updated
.
Post not yet marked as solved
1 Replies
175 Views
I can't use my Steam-Controller with non-steam games like World of Warcraft, because they detect the controller as keyboard and mouse. Where can I download a native MacOS driver witch does not require the Steam client running?
Posted
by nagybal.
Last updated
.
Post marked as solved
4 Replies
349 Views
Hello, After upgrading to macOS 13.0, the OS no longer responds to input from my DualSense controller. It used to work just fine before the upgrade. The controller does get detected by the OS and can be seen as connected in the controller settings pane. Clicking on the Identify button in the Game controllers settings pane does make the controller to vibrate. But it seems the OS either is not receiving input from the controller, or is not responding to them. Can you please confirm if this is a bug ? Is there anything I can do to get the controller working again ? Thank you so much
Posted
by hamza0867.
Last updated
.
Post marked as solved
2 Replies
464 Views
Now I am using iOS 16 beta 6, I can get buttonA/buttonB is pressed event. but cannot get accelerator motion data info.      //work     buttonA?.valueChangedHandler = {(_ button: GCControllerButtonInput, _ value: Float, _ pressed: Bool) -> Void in       print(">>> ButtonA tapped")     }     //work     buttonB?.valueChangedHandler = {(_ button: GCControllerButtonInput, _ value: Float, _ pressed: Bool) -> Void in       print(">>> ButtonB tapped")     }           // this is not works     gameController.motion?.valueChangedHandler = { (motion: GCMotion)->() in       print(">>>> motion data \(motion.acceleration.x) \(motion.acceleration.y) \(motion.acceleration.z)")       if let delegate = self.motionDelegate {         delegate.motionUpdate(motion: motion)       }     } Is there any plan to support this?
Posted
by haozes.
Last updated
.
Post marked as Apple Recommended
11k 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
563 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
297 Views
Hi! We are currently developing a game with online capabilities for Apple Arcade and received the following guidelines: Required: If you must authenticate the local player on a third-party server, use fetchItemsForIdentityVerificationSignature using gamePlayerID (note: documentation for this API references teamPlayerID not gamePlayerID). It's true that the documentation for fetchItemsForIdentityVerificationSignature only references teamPlayerID, but it's not clear how to use gamePlayerID in this context. We tried simply swapping teamPlayerID for gamePlayerID when generating a signature, but it didn't work (expectedly, given that the two IDs are different). What are the steps involved to make the authentication compliant? Thanks in advance!
Posted Last updated
.
Post not yet marked as solved
2 Replies
370 Views
I connected the native PS4/Xbox joystick to my M1 MacBook to test my iPad Game, choose "My Mac (Designed for iPad)" and run it via xcode/ archive and install it as an mac app. But the joystick buttons response very slowly and have large delay (detect input via GCController.extendedGamepad.valueChangedHanlder). The same code runs property if I build the app to iPad and connect the same joystick. My app CPU Percentage Used is over 100%, is it relative to this question?
Posted Last updated
.
Post not yet marked as solved
1 Replies
249 Views
hey hey i have a question and i use the GCVirtualController in a spritekit game. But I think the elements in my scene are way too high. I would like them below. is it possible to change the elements such as the thumbstick, the Y or X position?
Posted
by blizzta1.
Last updated
.
Post not yet marked as solved
1 Replies
284 Views
I'm using MacBook Pro (14-inch, 2021) paired over bluetooth with Xbox Wireless Controller (STANDARD GAMEPAD Vendor: 045e Product: 02e0) according to result tested on https://gamepad-tester.com/ which works fine. Steam Big picture mode works fine. I test the following games with and without steam input support. Steam's Hollow Knight Steam's Overcooked 2 the controller doesn't work in game at all but it able to navigate and works fine with the steam overlay in-game. Does anybody have this issue? is there any workaround?
Posted
by RionKPR.
Last updated
.
Post not yet marked as solved
1 Replies
236 Views
I found that GCMouse not work when I run iOS app on M1 Mac directly, so I want to detect and handle the mouse event via gestureRecognizer or other way. But is there any way to handle middle/right button easily?
Posted Last updated
.
Post not yet marked as solved
0 Replies
285 Views
Hello everyone, I am debugging an iPadOS/iOS app on XCode and want to run it on Mac directly (choose "My Mac (Designed for iPad)"). Everything is all right except for the input. When I press any key on my MacBook's keyboard or the mouse button on my connected mouse, I never accept any callback events (no print and no breakpoint worked in the handler callback block) via the GCMouse.current.mouseMovedHandler and GCKeyboard.coalesedKeyboard.keyboardInput.valueChangeHandler, while they seem to be registered successfully. (The same code works if I build and run an app on iPad connected with bluetooth keyboard and mouse.) GCKeyboard.coalesedKeyboard and GCMouse.current are not nil, and I can accept GCkeyboardDidConnectNotification and GCMouseDidConnectNotification events. But if I connect multi keyboards, I receive connect notification only once. And printf("%d", (int)keyboardInput.anyKeyPressed) in my Update Function is always "0"(false). However, the callback in UIKit - (void)pressesBegan:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event works. Is GameController not support MacBook's native keyboard and mouse input? System Version: macOS Monterey 12.6 Device: MacBookPro(13-inch, M1, 2020) XCode Version: 13.3.1 (Besides, when I connect the xbox/ps4 joystick, the GCController input handler work but will have very long delay. It's another question.)
Posted Last updated
.
Post marked as solved
10 Replies
985 Views
Hey, there's an issue in the latest Xcode 14.1 beta (14B5024h) where importing the GameController module causes the build to fail. It produces the following error: Failed to build module 'GameController' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug Steps to reproduce Create new Xcode app project Add the line import GameController to the top of the file It can't build and fails with the above error. I've also filed a bug report with Apple (FB11538209). Please fix this issue!
Posted
by itsyusuf.
Last updated
.
Post not yet marked as solved
0 Replies
260 Views
Can you tell me if the following within the policy of Apple: We are an educational gaming company and we want to create a Games login screen that has a (login) button and (register) button.Register button will be used to redirect the user to our website for registration and purchases subscriptions and game assets. The login button will be used to login then retrieves data from our servers related to the child account to reflect his/her performance on games since we are educational game, and purchased items and/or levels. The login will also pass the token for communicating progress in the game. Has any one done this design before or advise on it. Thank you
Posted
by hatyah.
Last updated
.
Post marked as solved
1 Replies
389 Views
I previously posted this problem in regards of a similar problem on iPads https://developer.apple.com/forums/thread/711905 on iPads the problem can be solved by using controller.physicalInputProfile.buttons[GCInputButtonHome].preferredSystemGestureState = GCSystemGestureStateDisabled; However this doesn't work on tvOS. A short press on the PS button is opening up some kind of menu (look at the attached screenshot) and a long press is causing the app to get minimized. Can this be avoided somehow? This is actually a very annoying problem for users when the PS button doesn't work correctly and causing the app to get minimized.
Posted
by grill2010.
Last updated
.
Post not yet marked as solved
1 Replies
301 Views
I'm trying to understand the startWirelessControllerDiscovery method from GCController. I'm able to pair a Playstation controller in Settings.app > Bluetooth. It works perfectly in my game afterward. But I'm also trying to let the user perform the pairing directly from the game. The controller is unknown to the device at this point. I'm executing startWirelessControllerDiscovery in the code but nothing happens. The controller is in "pairing mode" but isn't connecting/pairing. My expectation would be that the controller connects to the device in the same way as manually selecting it from settings. If startWirelessControllerDiscovery isn't supporting this scenario then what is the intended purpose?
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.6k Views
I want to publish my game in China. But it is not written in English. I do not know the ABCD of CHINESE language. What Should i do?. I need an Approval Number. Apple does not provide proper support to get any Approval Number from China Mainland. Availability in China Mainland Chinese law requires games to secure an approval number from China's National Press and Publication Administration. If you offer or plan to offer paid games or games with in-app purchases, provide your approval number and supporting documents to make sure your app will be available on the App Store in China mainland.
Posted Last updated
.
Post marked as solved
1 Replies
470 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
.