mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 05:27:48 +00:00
Fixed bug 2603 - iOS: update joystick accelerometer code to use CoreMotion instead of the deprecated UIAccelerometer
Alex Szpakowski SDL's code for exposing the accelerometer as a joystick on iOS currently uses UIAccelerometer, which was superseded by the CoreMotion framework and deprecated since iOS 5. The UIAccelerometer code still works (for now), but it also throws deprecation warnings whenever SDL is built for iOS, since SDL's deployment target is no longer below iOS 5. I've created a patch which replaces the old UIAccelerometer code with a replacement based on the CoreMotion framework. It has identical functionality (to SDL users), however iOS apps are now required to link to the CoreMotion framework when using SDL.
This commit is contained in:
@@ -25,9 +25,10 @@ Xcode-iOS project. Those are:
|
||||
-UIKit.framework
|
||||
-Foundation.framework
|
||||
-CoreAudio.framework
|
||||
-CoreMotion.framework
|
||||
|
||||
All of these frameworks are part of the iOS SDK, not part of the core OS X
|
||||
system.
|
||||
|
||||
Run the clean script to clear out the directory of Xcode-related files
|
||||
and binaries.
|
||||
and binaries.
|
||||
|
||||
Reference in New Issue
Block a user