0

I know that the framework was introduced in iOS 4 with the gyro. But is Core Motion backward-compatible? Or I am restricted to use UIAcceleration?

Does this imply that either I can't use the gyro or can't support earlier devices?

TiansHUo
  • 8,509
  • 7
  • 45
  • 57
  • I don't understand your question. The gyro didn't exist on earlier devices, so how could you support it? – NSResponder Jul 29 '11 at 03:47
  • @NSResponder, the conflict is that if the app uses the gyro, it must use Core Motion, but that means the app doesn't support devices below iOS 4 – TiansHUo Jul 29 '11 at 03:57

1 Answers1

2

The Core Motion framework is not available on pre 4.0 devices so you should wrap all related code into a runtime check to see if the class exists which is the recommended way according to Apple.

Community
  • 1
  • 1
coneybeare
  • 33,113
  • 21
  • 131
  • 183
  • Is there a 3rd-party library that helps me with this? I think at least there must be plenty of developers who have the same problem: no gyro or no backwards-compatibility. – TiansHUo Jul 29 '11 at 03:59
  • Most iOS devs are moving past iOS 3.x There is something like 2 or 3 percent of users who have not upgraded to at least iOS 4, and those users are probably moms, not gamers. – coneybeare Jul 29 '11 at 04:44