AFTERPAD

Link: ‘The Issues with iOS 8 and MFi Controllers’

Gary from Bouncing Ball Games, developer of the excellent Aztec Antics game, digs into the issues surround iOS8’s MFi controller woes.

Gary from Bouncing Ball Games says:

My game uses both the connect and discount notifications along with the list of connected controllers. A single player game can just assume that the controller they want to reference is the first in the list but I need to show which player colour will represent which controller.

I was seeing that for each controller there were 2 players listed, this meant a single player game was impossible. I kept thinking it was an issue that would be resolved in the next beta so I did not look in to the cause or submit a Radar (Apples version of bug submission).

[…]

I had a few goes at disconnecting and reconnecting my MFi controller and eventually the app crashed. I hooked it up to Xcode to check the device logs and saw it crashed when trying to query the controllers property of “isAttachedToDevice”. This will return true for the case type controllers and false for Bluetooth controllers. It’s useful to know this as you could rely on touch screen buttons also if you know they are near the device. I tried calling this code on my phantom forwarded controllers and rather than fail gracefully or report false it instead crashed, just like the Game Controller Tester. Sometimes the forwarded controller connects first, sometimes the real controller does.

This is something, I think, Apple are expecting developers to work around. Controller forwarding is a new feature and we will need to update our apps to support this.

Read More

If you’re a developer, you need to read the whole piece. It gets into some of the nitty gritty details about what could be causing the issue, and provides a work-around solution for fixing it.

Myself, I still have some questions about why this problem is occurring in the first place. This seems like a pretty serious bug on Apple’s end, not a deliberate change in how controller support works.

Controllers SHOULD show up as forwarded when they’re being forwarded from an iPhone to an iPad. When they’re not, they should show up exactly the same as they did in iOS7. Thats what I took away from watching Apple’s keynote on game controllers at this year’s WWDC. I have no idea why Bluetooth controllers are showing up twice, but I’d be shocked it if was an intentional change. If it WAS an intentional change, I have no idea why Bluetooth controllers are behaving any differently from Lightning controllers.

Anyways, this article provides a great workaround for developers, and is well worth a read. A patch for Aztec Antics that incorporates this workaround has already been submitted, and should be available soon.